谷歌语音文本转换python代码_python - Python Google语音到文本的转换 - SO中文参考 - www.soinside.com...
[我正在使用spyder IDE將我的語(yǔ)音文本轉(zhuǎn)換為Google語(yǔ)音文本API。我已將Google語(yǔ)音集成到代碼中的文本中,并出現(xiàn)類(lèi)似“配額耗盡”的錯(cuò)誤。在Google控制臺(tái)中轉(zhuǎn)到信息中心后,我可以看到可用配額。import speech_recognition as sr
r = sr.Recognizer()
sample_call = sr.AudioFile('sample_call_new.flac')
with sample_call as source:
audio = r.record(source)
type(audio)
response = r.recognize_google_cloud(audio,language='en-US', show_all=True)
print(response)ERROR
File“ C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ speech_recognition__init __。py”,第932行,在ognize_google_cloud中引發(fā)RequestError(e)
RequestError:https://speech.googleapis.com/v1/speech:recognize?alt=json返回“配額指標(biāo)'speech.googleapis.com/default_requests'超出配額,并限制了服務(wù)'speech.googleapis的'DefaultRequestsPerMinutePerProject'消費(fèi)者'project_number:764086051850'的.com”。”。詳細(xì)信息:“ [{'@ type':'type.googleapis.com/google.rpc.Help','鏈接':[{'description':'Google開(kāi)發(fā)者控制臺(tái)API密鑰','url':'https://console.developers.google.com/project/764086051850/apiui/credential “}]}]“> *
總結(jié)
以上是生活随笔為你收集整理的谷歌语音文本转换python代码_python - Python Google语音到文本的转换 - SO中文参考 - www.soinside.com...的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: python sftp模块_python
- 下一篇: python中字典的常用函数_pytho