Python Text to Speech With Different Languages (Simple)
Max O'Didily
Python Text to Speech With Different Languages (Simple)
Greetings in this tutorial we shall be looking at how to do text to speech (tts) using Python. This tutorial will focus on how to speak different languages and how to change the speed of the speech. For example, we could use a slow speaking Spanish voice to help us learn how something could be pronounced in Spanish.
We will be telling our Python GTTS program to speak what we have stored in a string. We will then save the result to an audio file. I picked .wav but you can do .mp3. We can then open our audio file and listen to the python gtts say what we wanted.
You will need to import from gtts import gTTS.
This tutorial requires the GTTS library. It is super simple to install but how you do so may vary depending on what your setup is. In Visual Studio you can manager your packages in the IDE. Otherwise you can use a pip install gTTS command. You may have to do -m pip install gTTS.
Thanks for watching this Python tutorial on how to do text to speech in a quick and simple way.
Subscribe to keep notified when I upload: https://tinyurl.com/SubMaxODidily
Python Text to Speech With Different Languages (Simple) ... https://www.youtube.com/watch?v=TfAUy1hkTfo
14883944 Bytes