In this video, we will show to methods to convert text to speech in python. In first method we will use gTTS (Google Text-to-Speech), it is a Python library and CLI tool to interface with Google Translate’s text-to-speech API. It converts text of any language into speech and save in mp3 file. In second method we will use pyttsx3, pyttsx3 is a text-to-speech conversion library in Python which works offline and convert text to speech.
Topics covered
For language code: https://zetcode.com/python/googletrans/
#python