Text to Speech Synthesizer Service for OS X and macOS

Mac2Speech - a Speech Synthesis Server for OS X and macOS Sierra, allowing you to use your Mac as a Text-To-Speech server, converting text strings into MP3 voice sound files on the fly.

A web user-interface allows for rapid testing and experimentation with different languages and voices.





HTTP GET Request


Sending an HTTP GET with
voice and text parameters, will result in a MediaType.APPLICATION_OCTET_STREAM. I.e. the audio content is streamed directly in the HTTP response. Additionally, if desired, the speech rate can be adjusted using the optional rate parameter. Rate is measured in words per minute, defaulting to 175, with a valid range from 1 to 750.
If an optional
save=true parameter-value pair is sent with the request, an additional HTTP header gets include, to encourage downloading instead of directly playing the MP3.
Here is an example:

http://localhost:8088/tts/?voice=Alex&text=Hello World!

HTTP POST Request


Sending an HTTP POST with
voice and text parameters, will create and temporarily store an MP3 file on the server. The URL to that MP3 file is returned and can be requested, until the server gets restarted, at which time all temporarily created files are deleted. Additionally, if desired, the speech rate can be adjusted using the optional rate parameter. Rate is measured in words per minute, defaulting to 175, with a valid range from 1 to 750.


MP3-Encoding


Not only are mp3 files almost universally playable, they are also considerably smaller than
wav or aiff files for instance, and still provide a decent sound quality. Mac2Speech comes with LAME built-in. LAME is a high quality MPEG Audio Layer III (MP3) encoder licensed under the LGPL.