admin管理员组

文章数量:1391947

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

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

Share Improve this question asked Jul 4, 2017 at 8:15 Inzamam MalikInzamam Malik 3,4653 gold badges33 silver badges62 bronze badges 2
  • This is way too broad, you need to show your code at least so we can try and understand what's failing – StudioTime Commented Jul 4, 2017 at 8:18
  • nothing is failing, every thing is working fine but only with internet, i will add code – Inzamam Malik Commented Jul 4, 2017 at 8:41
Add a ment  | 

2 Answers 2

Reset to default 6

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.

Looking at https://developer.mozilla/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.

本文标签: nodejswhy javascript Speech Recognition api is not working without internetStack Overflow