📜  很酷的东西 wirht python pips - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:19.148000             🧑  作者: Mango

代码示例4
#importing the gTTS libraryfrom gtts import gTTS#Asking the user for the required textmt = input("Enter the required text:\t")#Setting the output languagelanguage = ‘en’#Converting text to speech and choosing speed as fastvoice = gTTS(text=mt, lang=language, slow=False)#Saving the speech as mp3 filevoice.save(“conv.mp3”)