jasperproject / jasper-client

Client code for Jasper voice computing platform
MIT License
4.53k stars 1.01k forks source link

Getting 403 while using Google tts #427

Open confessin opened 8 years ago

confessin commented 8 years ago

Some googling showed that Google has blocked the translate API for tts. I am really not sure though.

Traceback (most recent call last): File "/home/pi/jasper/jasper.py", line 141, in app.run() File "/home/pi/jasper/jasper.py", line 108, in run self.mic.say(salutation) File "/home/pi/jasper/client/mic.py", line 262, in say self.speaker.say(phrase) File "/home/pi/jasper/client/tts.py", line 461, in say tts.save(tmpfile) File "/usr/local/lib/python2.7/dist-packages/gtts/tts.py", line 90, in save self.write_to_fp(f) File "/usr/local/lib/python2.7/dist-packages/gtts/tts.py", line 108, in write_to_fp r.raise_for_status() File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 840, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://translate.google.com/translate_tts?textlen=30&idx=0&q=How+can+I+be+of+service%2C+Rafi%3F&tl=en&client=t&total=1&ie=UTF-8

k0ssi commented 8 years ago

you are right, google is blocking public access to their TTS engine.

@Holzhaus may this TTS engine should be remove cause Google blocks public access since a half year ;)

Holzhaus commented 8 years ago

Upstream issue: pndurette/gTTS#15

Boudewijn26 commented 8 years ago

This should be fixed by the latest version of gTTS.

confessin commented 8 years ago

This pull request is merged. https://github.com/pndurette/gTTS/pull/17

I will try to update gTTS and try it again.