Text-to-Speech using Google Translate API and HTML5

Weston Ruter has developed a mashup that marries Google’s new Translate API that does text-to-speech (TTS) and HTML5 Audio support in modern browsers. “Looking at Firebug Net panel for where this TTS data was coming from, I saw that speech audio is in MP3 format and is queried via simple HTTP GET (REST) request: http://translate.google.com/translate_tts?tl=en&q=text. […]

Weston Ruter has developed a mashup that marries Google’s new Translate API that does text-to-speech (TTS) and HTML5 Audio support in modern browsers. “Looking at Firebug Net panel for where this TTS data was coming from, I saw that speech audio is in MP3 format and is queried via simple HTTP GET (REST) request: http://translate.google.com/translate_tts?tl=en&q=text. Google Translate notes that speech is only available for short translations to English, and it turns out that TTS web service is restricting text to 100 characters. Another restriction is that service returns 404 Not Found if request includes a Referer header. In spite of limitations of web service which certainly reflect intention that web service’s only to be used by Google Translate, thanks to new HTML5’s Audio element and rel=”noreferrer”, service may be utilized by client-side web applications.”

More info: Google Text-To-Speech (TTS)