答:代码如下:import speech_recognition as sr#get audio from the microphone r = sr.Recognizer() with sr.Microphone() as source: print("说话吧:") audio = r.listen(source) print("识别中...")try: text = r.recognize_google(audio, language="zh-CN") print("你说的是:" + text) except: print("抱歉,没能识别
写一个文本转化语音的python代码
最新推荐文章于 2023-05-11 09:32:27 发布