📅  最后修改于: 2022-03-11 14:45:03.446000             🧑  作者: Mango
from gtts import gTTS
# ask for text to speak
text = input("enter text to speak: ")
# generate tts
output = gTTS(text=text, lang="en", tld="co.in")
output.save(f"tts.mp3")