When i run the following code the error is generate.I had try by install same architecture X64-bit as my operating system and also install X32-bit . But it again gives me a error
import pyttsx3
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
print(voices[0].id)
engine.setProperty('voice',voices[0].id)
def speak(audio):
engine.say(audio)
engine.runAndWait()
if __name__ == "__main__":
speak("harry is a boy")