How to convert text into speech in python | jarvis python |python programming|pyttsx3 | code with RK

 import pyttsx3


engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')

engine.setProperty('voice', voices[1].id)

def speak(audio):
    engine.say(audio)
    print(audio)
    engine.runAndWait()

speak("This is my first python program")

Comments