I am making an Artificial Intelligence (AI) assistant and I wrote this to make it speak:
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voices', voices[0].id)
def speak(audio):
engine.say(audio)
print(audio)
engine.runAndWait()
it does not speak and shows:
Process finished with exit code 0
how to fix it??