Google text to speech tts api doesn't seems to

2019-07-28 23:36发布

问题:

Hello I tried using Google TTS api to convert text to speech.

http://translate.google.com/translate_tts?tl=en&q=Hello

However this doesn't play in browser.What's the issue ? This used to work till last year.

回答1:

Google has deprecated free access to the API, you now need an API key. Please see here for details.



回答2:

The example noted here worked for me:

wget -q -U Mozilla -O output.mp3 \
"http://translate.google.com/translate_tts?ie=UTF-8&total=1&idx=0&textlen=32&client=tw-ob&q=Test&tl=En-gb"