simple-google-tts icon indicating copy to clipboard operation
simple-google-tts copied to clipboard

Does not work for me... Is this script still working?

Open ghost opened this issue 9 years ago • 3 comments

Hi

Is this script still working? When I run it, I can't hear any sound, just get this output in console: "./simple_google_tts en "test" Reading from string. Using Google for TTS synthesis. Synthesizing virtual speech. Processing 1 out of 1 paragraphs Playing synthesized speech 1 All sections processed. Waiting for playback to finish."

I'm on Ubuntu Gnome 15.10.

Thanks!

ghost avatar Jan 03 '16 13:01 ghost

It looks like Google have finally locked down the Translate API. This means that any scripts using that unofficial interface have stopped working. Unfortunately I don't see any way of solving this. I'll have to mark this issue as wontfix and add a note to the README.

Please see here for more information:

https://github.com/desbma/GoogleSpeech/issues/4 https://github.com/pndurette/gTTS/issues/14

glutanimate avatar Jan 03 '16 14:01 glutanimate

Update the url's in speak.pl, replace all "client=t" instances with "client=tw-ob"

Eg;

this line: my $resp = $browser->get("https://translate.google.com/translate_tts?ie=UTF-8&tl=$language&q=$sentence&total=1&idx=0&client=t&tk=$amptk");

becomes: my $resp = $browser->get("https://translate.google.com/translate_tts?ie=UTF-8&tl=$language&q=$sentence&total=1&idx=0&client=tw-ob&tk=$amptk");

I hope this helps

sympoz avatar Nov 06 '16 13:11 sympoz

@sympoz:

Thanks a lot for posting this! The TTS requests do seem to go through again. Not sure how long this is going to last and what the exact limitations are, but for now this seems to be working fine.

I've posted a commit that updates the client accordingly.

glutanimate avatar Nov 06 '16 16:11 glutanimate