hiddentao / zhongwen

The source code to the zhongwen.co.uk website
http://zhongwen.co.uk
GNU Affero General Public License v3.0
2 stars 0 forks source link

Provide a text-to-speech functionality using Google translate #2

Open hiddentao opened 12 years ago

hiddentao commented 12 years ago

The "unofficial" Google text-to-speech API is documented here: http://techcrunch.com/2009/12/14/the-unofficial-google-text-to-speech-api/

It returns an MP3 file which can then be played using (I guess) the <audio> tag.

An example:

http://translate.google.com/translate_tts?tl=zh-CN&q=%E4%B8%AD%E6%96%87

hiddentao commented 12 years ago

Online demo using the audio tag: