Text to Speech in Python using the pyttsx/pyttsx3 module | Works Offline | Python Tutorial

Veröffentlicht am: 19 Mai 2020
auf dem Kanal: Rishabh Narayan
45,683
590

#Python #pyttsx #Programming

Hello Guys,
In this video, I am going to show you that how you can convert Text to Speech in Python using the pyttsx or pyttsx3 module. Both the modules have same syntax so you can use any of them without confusion. Install the module in your PC using the command 'pip install pyttsx' or 'pip install pyttsx3', and the plus point here is that it works offline...

The following is the code used in the video :

import pyttsx
engine = pyttsx.init()
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[1].id)
print(voices[1].id)
engine.setProperty('rate', 150)
engine.say("Hello, How are you ?")
engine.runAndWait()

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

speak("Hello, What's going on")

IDE Used : PyCharm IDE
Installation Tutorial :    • How to Download and Install PyCharm I...  
Download PyCharm : https://www.jetbrains.com/pycharm/dow...

Follow me on Instagram :   / ri5h46h  

Follow me on Twitter :   / explorishabh  

Email - nrishabh138@gmail.com

Thanks for watching my video... Do like, comment and Subscribe if you like my videos.


Auf dieser Seite können Sie das Online-Video Text to Speech in Python using the pyttsx/pyttsx3 module | Works Offline | Python Tutorial mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Rishabh Narayan 19 Mai 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 45,683 Mal angesehen und es wurde von 590 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!