Python

No description

fork
loading
Files
  • main.py
  • file.mp3
main.py
1
2
3
4
5
6
7
8
9
10
11
12
from gtts import gTTS
import os

# define variables
s = "escape with plane"
file = "file.mp3"

# initialize tts, create mp3 and play
tts = gTTS(s, 'en')
tts.save(file)
os.system("mpg123 " + file)
# os.remove(file)