I'm trying to experiment with different voices but can't seem to change the voice. Research gave me this example:
import pyttsx3
engine = pyttsx3.init('espeak')
engine,setProperty('voice', 'english+f1')
engine.setProperty('rate', 175)
engine.say("Hello, what would you like me to do?")
engine.runAndWait()
Which gave following error:
File "ttstest.py", line 3, in <module>
engine,setProperty('voice', 'english+f1')
NameError: name 'setProperty' is not defined
If I comment out
engine,setProperty('voice', 'english+f1')
Program runs fine
Have you tried using a period instead of a comma between
engine
andsetProperty
?