- We are using Googles Text-to-Speech API so we need to pip it:
pip install gTTs
- To play the audio we will using an player from the terminal:
apt install mpg123
- import the module:
import textToSpeech
- pass argument:
textToSpeech.tts("Hey this is cool")
- ta-da! The audio plays.