Open ErikBjare opened 8 years ago
Details on how to use the unofficial Google API here: https://stackoverflow.com/questions/9893175/google-text-to-speech-api
The following oneliner works for fetching mp3 with the spoken data, just HTTP encode the text to speak and put it as the q
parameter:
curl 'https://translate.google.com/translate_tts?ie=UTF-8&q=hello&tl=en&tk=995126.592330&client=t' -H 'user-agent: stagefright/1.2 (Linux;Android 5.0)' -H 'referer: https://translate.google.com/' > google_tts.mp3
eSpeak is simple and works, it also has the great advantage of running locally. But the voices it produces are far inferior to those of for example Google's APIs (which are pretty damn near perfect).
So since there is such a large gap for improvement, it might be something worthwhile to look into. It would be nice with espeak as a fallback agent if, for example, internet connectivity fails.
Also, if Google's APIs are used to generate TTS it would be a good idea to cache the audio output of the responses, preventing unnecessary API calls to an unofficial API that may fail at any time (and disclose information to Google about the users habits).
This should be considered low priority, but I personally have a great deal of affection for this issue.