I want to write a script which will read a list of words as it prints them to the screen.
import pyttsx
engine = pyttsx.init()
words = ["here","are","some","test","words"]
for i in words:
engine.say(i)
print i
engine.runAndWait()
However, in running the above, all words other than "here" are cut short. I hear something like "here [pause] ar- so- te- wo-"
If I unindent engine.runAndWait()
, the words are said after the loop is done. When I do this, they aren't cut off, but, of course, they aren't said at the at the same time they're printed.
I'm running Ubuntu 14.04.2