Speech Python Program

import pyttsx3

engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voice',voices[1].id)
# rate 
VoiceRate = 145
engine.setProperty('rate', VoiceRate)


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

speak("Hi my name is ummmmm....Tejas How are you ? Hope you are doing well...Please type something which you want me to say for you!!")
query = input("Type here : ")
speak(query)

Comments