【发布时间】:2018-07-25 11:24:16
【问题描述】:
我在我的 Python 应用程序中使用 SpeechRecognition。但是,它只能识别英语。我希望它也能识别其他语言。我知道这是可能的。任何人都可以帮助我改变Python2.7中语音识别语言的语法吗 请帮忙!提前致谢。到目前为止,这是我的代码:
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
try:
audio = r.listen(source)
text = r.recognize_google(audio)
except:
pass
【问题讨论】:
标签: python python-2.7 speech-recognition google-speech-api