I have a co-worker of mine who used to use his own Google Tradutor
.
See how he did in PHP:
$google_url = 'https://translate.google.com/translate_tts?ie=UTF-8&q=%se&tl=pt&total=1&idx=0&textlen=5&tk=489936&client=t&prev=input&ttsspeed=0.24';
$text = urlencode('Meu nome é Wallace');
$url = sprintf($google_url, $text);
copy($url, 'meu_arquivo.mp3');
This code can be used in any other language (as long as it accepts copying remote files).
See that this link works by clicking here
Update 06/01/2016
I have just discovered that this information is now restricted, and that you can only use this resource through a key from Translation API.
I also believe that it is necessary pay for the service.
I think it will be VERY difficult for you to find this.
– RFL
tries to debug google translator.
– Guilherme Lautert
I do not find it very difficult. See my answer and you will see how I did with Google translator :)
– Wallace Maxters