zaf / asterisk-googletts

Asterisk AGI script that uses Google's translate text to speech service.
GNU General Public License v2.0
214 stars 125 forks source link

Google is now redirecting to a CAPTCHA page #17

Closed pla1 closed 9 years ago

pla1 commented 9 years ago

Hi,

Thanks for a great tool. Unfortunately Google is now redirecting to a CAPTCHA page. Let us know if you find a work-around.

Thanks, PLA

zaf commented 9 years ago

Thank you for the notice, I have just pushed an updated version that seems to work here. Please test and report.

yusufgungor commented 9 years ago

Can you add error notify about captcha issues? Because even captcha error the script was return 0. By the way thanks you very much for quick fix.

pla1 commented 9 years ago

New version of googletts.agi is not working for me so I tried the following command.

htplainf@ub-asterisk:~$ perl ./googletts-cli.pl -t "This is a test" -o test.wav Failed to fetch speech data. at ./googletts-cli.pl line 135.

Is my syntax correct?

zaf commented 9 years ago

Hello, syntax seems correct. Can't reproduce the issue here, both script are working, have you pulled the latest version?

pla1 commented 9 years ago

I have the latest version. Any troubleshooting suggestions?

tts

pla1 commented 9 years ago

I tried it on another machine and it works. Something different about my Asterisk server. I will troubleshoot some more. Sorry for the bother. Thanks, PLA

zaf commented 9 years ago

Could be google blocking your IP after it detected a lot of requests. I have seen it happening a few times.

pla1 commented 9 years ago

This is bizarre. I put a print statement in googletts-cli.pl to get the URL. The URL works fine in a browser on another machine, works fine with wget on another machine, wget fails from my Asterisk server. Both machines are behind the same Cisco firewall and use the same NAT'ed public IP address. Why in the world is Google responding differently between the two requests? :8ball:

tts

pla1 commented 9 years ago

Please consider adding use LWP::Protocol::https; to the Perl scripts so that the user is notified of the missing module instead of silently failing.

The LWP::Protocol::https; module was missing on a couple of Ubuntu systems. I installed the missing module with cpan. On one system I additionally had to sudo apt-get install liblwp-protocol-https-perl prior to installing the missing module in cpan.

All systems are working now.

Thanks, PLA