简体   繁体   English

Web Speech API中的网络错误

[英]Network Error in Web Speech API

I'm experimenting with the Demo of the Web Speech API: https://www.google.com/intl/en/chrome/demos/speech.html . 我正在尝试Web Speech API演示: https : //www.google.com/intl/zh-CN/chrome/demos/speech.html You'll need version 25.0 of Chrome at least to run it. 您至少需要25.0版的Chrome才能运行它。

I'm trying to use the Web Speech API continuously for a long transcription (10-15 minutes). 我试图长时间连续使用Web Speech API(10-15分钟)。 However, I'm noticing that after roughly 1-2 minutes there is a "network" error (as mentioned in the Web Speech API Spec: https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#dfn-onerror ). 但是,我注意到大约1-2分钟后出现“网络”错误(如Web Speech API规范中所述: https : //dvcs.w3.org/hg/speech-api/raw-file/ tip / speechapi.html#dfn-onerror )。

Does anyone know why this "network" error is happening pretty consistently after 1-2 minutes and if there is any way to configure the Web Speech API for longer, continuous transcriptions? 有谁知道为什么这种“网络”错误在1-2分钟后会持续发生,以及是否有任何方法可以配置Web Speech API以实现更长的连续转录?

Thank you! 谢谢!

Web speech API usually has 60 seconds of recognition time. Web语音API通常具有60秒的识别时间。

You'll need to call the speechrecognition.onend() method and then call the speechrecognition.start(). 您需要先调用Speechrecognition.onend()方法,然后再调用Speechrecognition.start()。 So the recognition continues after stop. 因此,停止后识别仍会继续。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM