Text_to_Speech Video :-
In your CMD write "pip install pyttsx3" and press ENTER.
2. And then open VsCode or any other terminal that you are working at and write the following code:-
import pyttsx3
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[0].id)
engine.setProperty("rate", 170)
def speak(audio):
engine.say(audio)
engine.runAndWait()
speak("#Here you can write anything and it will speak the same..")
Hope you liked it !!!!
No comments:
Post a Comment