import pyttsx3
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voices',voices[1].id)
def speak(a):
engine.say(a)
engine.runAndWait()
speak('Hello Bro, How are you?')
#After restarting my pc also didn't affect anything. I get David voice only but when i used print(voices[0].id) and print(voices[1].id) the #output in terminal was coming different. Please help me through this problem.