Python Text To Speech | Learn python |pyttsx module |Python Tamil | Convert Text to Speech in Python

Pubblicato il: 30 novembre 2020
sul canale di: DIGITAL CABIN
264
13

For new #python developer, pyttsx3 is a cool little library to convert text to speech.
This simple #tutorial will help to create something simple and fun.

Use this command for Installation:

pip install pyttsx3

pyttsx is a cross-platform text to speech library which is platform independent.
The major advantage of using this library for text-to-speech conversion is that it works offline.
However, pyttsx supports only Python 2.x.
Hence, we will see pyttsx3 which is modified to work on both Python 2.x and Python 3.x with the same code.



Usage –
First we need to import the library and then initialise it using init() function. This function may take 2 arguments.
init(driverName string, debug bool)

drivername : [Name of available driver] sapi5 on Windows | nsss on MacOS
debug: to enable or disable debug output
After initialisation, we will make the program speak the text using say() function. This method may also take 2 arguments.
say(text unicode, name string)

text : Any text you wish to hear.
name : To set a name for this speech. (optional)
Finally, to run the speech we use runAndWait() All the say() texts won’t be said unless the interpreter encounters runAndWait().


Source Code : https://github.com/imtiyazshamim/pyth...


Linkedin :  / shamim-imtiyaz-11a3406b  


In questa pagina del sito puoi guardare il video online Python Text To Speech | Learn python |pyttsx module |Python Tamil | Convert Text to Speech in Python della durata di ore minuti seconda in buona qualità , che l'utente ha caricato DIGITAL CABIN 30 novembre 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 264 volte e gli è piaciuto 13 spettatori. Buona visione!