SpeechRecognition API

Does InfinityFree support SpeechRecognition API? I have a website with speech-to-text functionality hosted in InfinityFree, and the functionality doesnt work, however the local version of my website in my computer runs perfectly fine. I am aware that SpeechRecognition API only runs in ‘chromium-based’ browsers and so I only test and run my website in these particular type of browsers.

Due to this??

4 Likes

If it is a browser-based API, there’s no reason it shouldn’t work here. However, many new APIs like this one require your site to have a SSL/TLS certificate (normally there’s an exception made for the localhost domain) [see note below].

Reading the MDN article makes me think that: 1) there is no need for an ssl/tls cert to use this API; 2) maybe it is currently not possible to use the SpeechRecognition API here when using Chrome as your browser. Did you set up any server-side processing in your local development environment? Or just browser APIs and whatnot?

I personally have never used this api (or heard of it for that matter), and it seems like it’s still in an experimental state.

5 Likes

Hi, thanks for your reply. Nope, as far as I know I only implemented this using API and I did not set up any server side processing in my local development environment, however reading through the SpeechRecognition MDN, I found this note:

Maybe it has something to do with the issue?

Actually, the speech to text feature of my website is just referenced online, here is the source code:

It can be something like this:
many OS block microphone access to apps and you need to explicitly allow it
browsers often block it if you don’t allow it for a specific address

3 Likes

I think what this means is that if you use the Speech Recognition in Chrome, the audio is sent to Google’s servers to be decoded. That makes a lot more sense to me than asking every website owner in the world to add a component to their servers that can do audio transcription.

The HTTPS explanation of @wackyblackie makes a lot more sense to me, a lot of newer browser features are configured to only work with HTTPS. Site permissions, like @Oxy said, also makes sense. You don’t get this problem in local development because browsers often contain exceptions for localhost to make it easier for developers to test their code on their own system.

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.