#谷歌文字转语音api
from gtts import gTTS
with open("demo.txt",'r',encoding="utf8") as f:
audio = gTTS(text=f.read(),lang="zh-cn")
audio.save("demo.mp3")
#谷歌文字转语音api
from gtts import gTTS
with open("demo.txt",'r',encoding="utf8") as f:
audio = gTTS(text=f.read(),lang="zh-cn")
audio.save("demo.mp3")