语音识别返回'不好的请求'
我使用语音识别
和通过麦克风输入原始数据。而且,我也使用ensenizer_google
对文本进行语音。但是它返回一个称为糟糕请求
的错误。
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
print("Say something!")
audio = r.listen(source)
try:
print("Google Speech Recognition thinks you said " + r.recognize_google(audio))
except sr.UnknownValueError:
print("Google Speech Recognition could not understand audio")
except sr.RequestError as e:
print("Could not request results from Google Speech Recognition service; {0}".format(e))
错误是:
Say something!
Could not request results from Google Speech Recognition service; recognition request failed: Bad Request
I use Speech Recognition
and input raw data via Microphone. And also I use Recognizer_google
to do speech to text. But it return an error called Bad Request
.
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
print("Say something!")
audio = r.listen(source)
try:
print("Google Speech Recognition thinks you said " + r.recognize_google(audio))
except sr.UnknownValueError:
print("Google Speech Recognition could not understand audio")
except sr.RequestError as e:
print("Could not request results from Google Speech Recognition service; {0}".format(e))
and the error is:
Say something!
Could not request results from Google Speech Recognition service; recognition request failed: Bad Request
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论