Translate TTS 503 Unavailable

4,440 views
Skip to first unread message

Seth Bean

unread,
Feb 11, 2013, 7:03:34 PM2/11/13
to google-tra...@googlegroups.com
I'm using the tts feature of translate, and using the url http://translate.google.com/translate_tts?tl=enq=some+text

I'm able to get the voice data.

However, when I attempt wget it from a web server, I receive 503 Service unavailable.

I've used this app for a while, and the URLs aren't doing anything crazy. Has my IP been blocked? If not, what else could be the problem?

Zain Khan

unread,
Jul 28, 2015, 2:24:24 AM7/28/15
to Google Translate API Developer Forum
Hey Seth! I know it's pretty late since you posted this issue, but I am facing the exact same issue, however, I am using a python interface (https://github.com/pndurette/gTTS/tree/d7e02d68444f924aaeb7ffe0136b284ea81f5761). How did you solve this issue? Thanks

Nick

unread,
Jul 28, 2015, 11:04:44 AM7/28/15
to Google Translate API Developer Forum
Hey Zain, 

Could you post the exact text of the error, and describe how you're accessing the API in more detail, including what kind of data you're sending? Also, are you still observing this issue, or was it temporary?

Regards,

Nick 


Mark V

unread,
Jul 29, 2015, 8:37:19 PM7/29/15
to Google Translate API Developer Forum
Yesterday I also started getting errors with an HTTP_GET query to http://translate.google.com/translate_tts?ie=UTF-8&q=text in a PHP script and found that Google was "blocking" my IP.
 
It asked for a Captcha code which I submitted and then it started working again, but ONLY within a browser window. I need to download the TTS MP3 and merge it with another fixed MP3 prefix for an application I've had running on my home server to generate spoken text over the intercom for a disabled family member. Now this no longer works and I'm frantically looking for a solution or another service. (I've tried voiceRSS but the voice quality is lacking compared to Google.)
 
Sadly, it looks like Google may be deprecating the TTS service or moving it to a paid service, but I can't find any information on using TTS in their Google Translate API v2 documentation. Hope somebody can help!
 
Mark
 
 
 
 

Adam Milewski

unread,
Jul 30, 2015, 4:38:29 PM7/30/15
to Google Translate API Developer Forum
We've had the same start happening with us.  I've looked everywhere and in google's API to no avail (we have no problem paying for the service if that is what they are looking for).  Any help or suggestions would be appreciated!  

Mark V

unread,
Jul 30, 2015, 8:36:54 PM7/30/15
to Google Translate API Developer Forum
Adam,
 
Yeah, I've also been looking for a TTS API which "should" be part of the Google Translate API, but haven't found anything.
I'm signed up as a developer as well. Come on Google, give us some clues... ;-) 

Nick

unread,
Jul 31, 2015, 10:33:53 AM7/31/15
to Google Translate API Developer Forum
Hey Mark,

Thank you for taking the time to detail your experience. I'll be in contact with the Translate team and will reply back to this thread with some answers for you shortly.

Best wishes,

Nick

Mark V

unread,
Jul 31, 2015, 11:56:18 AM7/31/15
to Google Translate API Developer Forum
Thanks Nick, looking forward to your reply.
 
FYI, here's the error message I get with a browser HTTP_GET:
 
"Our systems have detected unusual traffic from your computer network. This page checks to see if it's you really sending the requests, and not a robot. Why did this happen (link)".
 IP address: xxx.xxx.xxx.xxx
 Time: xxx
 URL: https://translate.google.com/translate_tts?ie=UTF-8&tl=en-us&q=text%20sample
 
When called from within my PHP script (to get the TTS MP3), the same URL returns a 503 error.
 
I'm sure there is no "unusual traffic" from my IP since the script only makes about 3-5 queries per day, each with less than 20 or 30 words.
 
Mark

Nick

unread,
Jul 31, 2015, 4:06:49 PM7/31/15
to Google Translate API Developer Forum
Hey Mark,

It appears that this "section" of the translate API is not official, and was found through a sort of odd URL discovery from inspecting the source of the translate mobile app. It also doesn't appear to be working from my end. In light of that, and to ensure that you get a solution to your relative's needs, I looked it up and there are some free APIs out there that do TTS, such as this one

I'm continuing to look into this issue and will have a more formal statement about the supposed "TTS API" soon, but just wanted to make sure you don't find yourself and your family in a difficult situation based on this, even if the "API" is unofficial and not supported.

Regards,

Nick

Mark V

unread,
Jul 31, 2015, 5:52:52 PM7/31/15
to Google Translate API Developer Forum
Nick,

Thanks for the reply. I checked out the link you included (www.tts-api.com) but the voice quality is pretty poor. I'm currently using voiceRSS as a workaround, it has decent voice quality but still not equal to Google's.

Hoping that Google will restore the TTS service, even if it's a fee-based API.

Mark

Mark V

unread,
Aug 20, 2015, 11:45:03 PM8/20/15
to Google Translate API Developer Forum
Any news yet on the Google TTS api? 

JohnS Alabama

unread,
Sep 10, 2015, 1:38:42 PM9/10/15
to Google Translate API Developer Forum
I'm having the same problem with the same API. We have an autistic family member living with us. I wrote a php webpage on a Raspberry Pi at home that asks to enter a message to send. The text of the data (message) overwrites a file which a python script uses to send the message to a scrolling LED display in his bedroom, forwards a copy SMS to my cellphone and uses the Google TTS API described above to translate, download and play on a small amplifier in heard throughout the house. (I forward the SMS to verify the message made it).  Being this is homegrown and I am not a programmer by trade, rebuilding will be a nightmare. Any updates form Google or alternatives/workarounds discovered? Thanks in advance.

Mark V

unread,
Sep 15, 2015, 2:06:02 AM9/15/15
to Google Translate API Developer Forum
@JohnS

Until Google restores their API, or if they abandon it altogether, you can try the free "voiceRSS" API I mentioned in an earlier post. It's very similar and pretty much works as a direct replacement, so minimal recoding is needed. I've had it running in my application for several weeks without issue.

Hopefully Google won't abandon us; I'm willing to pay a reasonable fee for an open TTS API.

Wee Soo KANG

unread,
Oct 5, 2015, 11:02:55 AM10/5/15
to Google Translate API Developer Forum

JohnS Alabama

unread,
Oct 5, 2015, 12:46:35 PM10/5/15
to Google Translate API Developer Forum
Wee Soo Kang - I tried your example with the key string assigned by Google many moons ago and IT WORKS! Thank you so much. Now all I have to do is work out a script version to get the SMS text out of the temp file created earlier in the script.

I offer you an E-Handhake from across the internet!
Best Regards
John S

JohnS Alabama

unread,
Oct 5, 2015, 12:49:14 PM10/5/15
to Google Translate API Developer Forum
Mark V  - I just saw your message, thank you. I'll look into the voiceRSS API as suggested. First I'll try the script with solution offered by Wee Soo Kang.

Thank you so much,
John

Mark V

unread,
Oct 7, 2015, 12:03:04 PM10/7/15
to Google Translate API Developer Forum
The solution offered by Wee Soo Kang does work, but Google appears to be limiting the speech duration to 15 seconds.
Most of my TTS phrases are less than 15 seconds, but a few are longer (still less than 30 seconds in all cases) which results in no MP3 being returned.

JohnS Alabama

unread,
Oct 7, 2015, 2:24:46 PM10/7/15
to Google Translate API Developer Forum
In my application TTS is used on small SMS messages like "Call your mom" or "Feed the dogs". I've worked out creating the url in Python so the text message is dynamic and the spaces replaced by the + character.

(note: I am not a programmer and learning as I go) Here is solution so far. str.replace is used to reduce "potential" multiple space characters to one, and then replace the single space with the + symbol. Next a file with the url (including my key) is opened and the ZZZZZ characters are replaced with the text to be translated. The resulting url is a variable and also written to a file:

txtNoSpace=txtmsg // txtmsg is the original text handed off from the php webpage form
txtNoSpace = txtNoSpace.replace('    ', ' ')
txtNoSpace = txtNoSpace.replace('   ', ' ')
txtNoSpace = txtNoSpace.replace('  ',' ')
txtNoSpace = txtNoSpace.replace(' ', '+')
transfile = open("/home/pi/pygvoicelib/translate.txt", "w")
transfile.write(txtNoSpace)
transfile.close()
fo1 = open("/home/pi/pygvoicelib/googleurl.txt", "r")
url = fo1.read();
fo1.close()
url = url.replace("ZZZZZ", txtNoSpace)
fo2 = open("/home/pi/pygvoicelib/urlbuilt.txt", "w")
fo2.write(url)
fo2.close()

Thanks to everyone for helping get this far.

JohnS Alabama

unread,
Oct 7, 2015, 4:48:27 PM10/7/15
to Google Translate API Developer Forum
I gave up on the Google TTS system for now. It is unreliable. Sometimes the wget command works and sometimes it returns a 503 error Service Unavailable. When ran from within python the mp3 file is generated but will not play.

I went for Mark V's suggestion and got a RSSTTS key and am using that. Works like a champ and the audio is good enough for our purpose.

This has been a tremendous learning exercise. :)

John
Reply all
Reply to author
Forward
0 new messages