def speak(self, text):
"""
Processes the text and reproduces it (TTS method)
"""
tts = gTTS(text=(text), lang='en')
path = os.path.dirname(os.path.realpath(__file__))
tts.save(path+"/data/speech.mp3")
os.system("mpg321 "+path+ "/data/speech.mp3 -quiet")
评论列表
文章目录