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

  1. Convert text to speech
  2. gTTS library
  3. pyttsx3 library
  4. os library

For language code: https://zetcode.com/python/googletrans/

#python

Convert Text to Speech in Python - gTTS - Pyttsx3
8.10 GEEK