You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, first awesome lib! I'm using under linux and was preety easy to start, but now I want to change the speech to female... I'm trying with the code below without success... can you please help me?
The gender is a read-only property on a voice. To speak in a female voice, find a voice that has gender=female and use engine.setPropert('voice', voice.id) to set the engine to use that female voice.
Hi, first awesome lib! I'm using under linux and was preety easy to start, but now I want to change the speech to female... I'm trying with the code below without success... can you please help me?
import pyttsx
def say(text):
print "{}".format(text)
engine = pyttsx.init()
voices = engine.getProperty('voices')
for voice in voices:
print voice.gender
engine.setProperty('female', voice.gender)
print "change: {}".format(voice.gender)
engine.say(text)
engine.runAndWait()
Thanks
The text was updated successfully, but these errors were encountered: