why javascript Speech Recognition api is not working without internet?

老子叫甜甜 提交于 2019-12-04 06:56:12

问题


I was working with javascript speech recognition api(new webkitSpeechRecognition()) and i amazed why it is not working without internet since it is javascript code so it should work offline

I checked the network section of chrome developer tools, it is even not making request to internet


回答1:


On Chrome, using Speech Recognition on a web page involves a server-based recognition engine. Your audio is sent to a web service for recognition processing, so it won't work offline.




回答2:


Looking at https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition:

SpeechRecognition.serviceURI
Specifies the location of the speech recognition service used by the current SpeechRecognition to handle the actual recognition. The default is the user agent's default speech service.

The actual recognition is done by a 3rd party server.
I assume the task of speech recognition currently is just too much for a browser to cope with on it's own or requires a big database.



来源:https://stackoverflow.com/questions/44900516/why-javascript-speech-recognition-api-is-not-working-without-internet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!