[Tux4kids-tuxtype-dev] Experimental text-to-speech in Tux Typing using Google's Translate/TTS

David Bruce davidstuartbruce at gmail.com
Sat Apr 30 22:08:02 UTC 2011


Hello all,

I just pushed a new experimental branch to git ("google_tts") with a
modification to tuxtype that causes the program to speak the words in
the Fish Cascade game when they are successfully typed.  The voice is
selected according to the currently active language/theme.  The word
is passed to http://translate.google.com using wget, and the mp3 file
returned from Google is played by mplayer.  The audio files are saved
locally, so each word in each language is only fetched the first time
it is used.

It works great, assuming you have wget, mplayer, and an internet
connection, but unfortunately this use isn't really allowed under
Google's Terms of Service, mainly because this is not a supported,
official API, and thus could break at any time without warning.  I
contacted Google and put in a request/suggestion to make this an
official API, and he said he'd be happy to pass along the suggestion.
He seemed fine with us maintaining an experimental branch that could
be released in the future if Google makes this a supported API.
However, I was advised not to put this into a public release.  It's
not that Google would sue Tux4Kids or anything like that, just that
they might discontinue or change this service and cause our app to
break, thereby potentially getting users upset at them.  I didn't ask
about the licensing terms of the generated audio files, but I strongly
doubt we could legally redistribute them.

I think it's a cool feature, but it relies on a non-Free (as in
Freedom) service, so I'm not sure if it will eventually make it into a
public release.  Feel free to try it out and give any suggestions.

David Bruce



More information about the Tux4kids-tuxtype-dev mailing list