A quick guide to the gTTS Library.
LoganSpong (45)

Ok, have you ever wanted a voice in your repl?
I'm here to help. This is..

gTTS for people who don't have time!

gTTS stands for Google Text-to-Speech. It's that voice you hear in Google Translate and other Google apps and products use it as well.

Ok! I know you guys just want to see the code, so let's get on with it!

Step 1: Install the gTTS library.

from gtts import gTTS

Step 2: Declare what you want it to say.

from gtts import gTTS
tts = gTTS('Hello gTTS')

Step 3: Save that .mp3 file.

from gtts import gTTS
tts = gTTS('Hello gTTS')

Step 4:

Run the program. In your "files" sidebar, you should see something like: hello.mp3.
Play it!

You are viewing a single comment. View All