I downloaded pyttsx, and it seems to work fine except that the list of voices only has one voice (Microsoft Anna). I'd like to be able to change it to a male voice, but nothing I tried or research worked! Here's my current test code:
import pyttsx
engine = pyttsx.init()
engine.setProperty('rate', 100)
voices = engine.getProperty('voices')
for voice in voices:
print "Using voice:", repr(voice.name)
engine.setProperty('voice', voice.id)
engine.setProperty('gender', 'male') #this doesn't raise an error, but also won't do anything
engine.say("Hi there, how's you ?")
engine.say("A B C D E F G H I J K L M")
engine.say("N O P Q R S T U V W X Y Z")
engine.say("0 1 2 3 4 5 6 7 8 9")
engine.say("Sunday Monday Tuesday Wednesday Thursday Friday Saturday")
engine.say("Violet Indigo Blue Green Yellow Orange Red")
engine.say("Apple Banana Cherry Date Guava")
engine.runAndWait()
and this only runs for one loop. If I say print(voices), it prints a list with only one item in it. Any suggestions?