Why does the html5 SpeechRecognition API not work when I'm connected to a VPN?

744 views Asked by At

I was making an app to use for my job with the HTML5 SpeechRecognition API (Chrome) and it works great until I connect to a VPN. Surely it's not sending this speech data to a remote source. All my code is served locally. I use a local server so the ES6 import feature will work. Why can't I use the API when connected to the company VPN?

2

There are 2 answers

5
Victor On

The SpeechRecognition engine is not embedded in your chrome browser. There is a server behind it.

When you use the API, your browser sends data to a server, and retrieve the transcription from it.

Check if your VPN is blocking the connection with the SpeechRecognition server.

0
Matt Shirley On

According to MDN web docs, speech data is sent to a server-based service.

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.

Edit: Verified this with Google Chrome's privacy whitepaper.