0

Tell me about module "pyttsx3" in python

10th Jun 2020, 10:17 AM
Psycho
Psycho - avatar
2 Answers
+ 2
Pyttsx3 stands for Python text to speech. This will help you in programs where you want to speak something. Here is the basic demonstration. First 'pip install pyttsx3 or python -m pip install pyttsx3' in the command prompt or terminal(search it in the search bar if you don't know where it is) import pyttsx3 engine=pyttsx3.init("sapi5") voices=engine.getProperty("voices") engine.setProperty("voice",voices[1].id) def speak(text): engine.say(text) engine.runAndWait() speak('Hello world')
15th Jun 2020, 11:39 AM
Vishnu
Vishnu - avatar