Skip to content Skip to sidebar Skip to footer

Request To Google Text-to-speech Api

I have this URL: http://translate.google.com/translate_tts?ie=utf-8&tl=en&q=Hello+world When I put it to the address bar in a browser and hit enter, I get mp3 file with syn

Solution 1:

The explanation is that Google restricts the usage of this service: according to this StackOverflow answer, Google returns a 404 error if the HTTP request contains a Referer header other than an empty string.

When you type the URL in the address bar, it's ok because no Referer URL is transmitted to Google. When you click on a hyperlink, you have a referer and Google blocks your request.

NB: I tested your URL (see here), and it worked. I suspect that it was only because I have tried before by typing the URL in my address bar, and the resource was still in my browser cache or in my audio plugin (VLC) cache.

NB2: See here for a workaround.

Post a Comment for "Request To Google Text-to-speech Api"