WebkitSpeechRecognition throws error "network"

I have speech recognition (using the webkitSpeechRecognition application) that works fine when working in a standalone Chrome browser.

I converted my application to an electronic package and stopped listening to the microphone and sent back a message with the message "network". The documentation states: "The network connection required to complete the recognition failed." However, it works perfectly in chrome directly without any problems.

I also used "SpeechSynthesisUtterance" for text to speech and which works without any problems with the electron.

I had a solution that worked quite well a couple of weeks ago during the creation of Proof Of Concept, and it stopped working.

Does anyone know what could be wrong?

0
source share
2 answers

I worked with my own Google Speech API.

Get according to the instructions given in https://docs.smart-mirror.io/docs/howto/how_to_obtain_chromium_speech_keys.html

Once you have the API key, ClientID and ClientSecret, set them to the variables of your computer environment with the keys GOOGLE_API_KEY, GOOGLE_DEFAULT_CLIENT_ID, GOOGLE_DEFAULT_CLIENT_SECRET, respectively.

Be sure to reboot the system after setting environment variables. Sometimes they do not get an immediate effect.

enter image description here

-1
source

From https://www.chromium.org/developers/how-tos/api-keys

Cannot get extra quota for Chrome Speech API. Take a look at the cloud speech API.

/ , Speech API.

API Google, Chromium, Google Chrome . API- (http://developers.google.com/console) API. API, "", .

, , , - . -, , Sphinx.

0

Source: https://habr.com/ru/post/1689085/


All Articles