So, I found this code:
import sys
import time
import pygst
import gst
input_string = sys.argv
input_string.pop(0)
tts_string = '+'.join(input_string)
print tts_string
music_stream_uri = 'http://translate.google.com/translate_tts?q=' + tts_string
player = gst.element_factory_make("playbin", "player")
player.set_property('uri', music_stream_uri)
player.set_state(gst.STATE_PLAYING)
time.sleep(12)
This is a great example of using the Google Text-to-Speech feature available in Google Translate using Python, the problem is that it can only speak English! transmitting text in Spanish (for example) makes the TTS function say "spanglish", while in the browser the TTS function (with an identical URL compared to the one created in this example) can REALLY speak Spanish or any other the language you want ... I tried changing the url, giving the program the language code using this url:
http:
(for spanish recognition)
, Spanglish... , , "" , -? (, , , ),