Posts Tagged ‘ text to speech

Speech 2 Text 2 Speech

Hot off the heels of my previous post on getting Python scripting on my Android phone via the “Scripting Layer For Android“, I wrote my first (silly) Python module directly on the phone:  I’ve coined it ‘Speech 2 Text 2 Speech‘:  You speak into the phone, it converts it to text, then says it back.  And, it’s sooo easy to do:

# speech2text2speech.py
import android
droid = android.Android()
speech = droid.recognizeSpeech("Talk Now", None, None)
print speech[1]
droid.ttsSpeak(speech[1])

Sometimes the “Talk Now” window pops up too fast and you have to reset it, but when it works it’s pretty funny to hear what you said repeated back in ‘Androidish’ 😉