Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Speech api not working on android chrome

Web speech api (webkitSpeechRecognition) return 'not-allowed' error on android phone.

(I gave Microphone permission to chrome app and site on android settings)

Chrome on desktop is working. But, on android is not.

(Test phone is Samsung Galaxy S9, Android Version 10, Chrome Version 86)

I tested MicrosoftEdge, SamsungInternet as well as Chrome on android. but all returns 'not-allowed' error.

Test Page https://www.google.com/intl/en/chrome/demos/speech.html

test code on chrome remote device console.

const a = new webkitSpeechRecognition()
a.onerror = (err) => {console.log("err:", err)}
a.start()
=> VM187:1 err: SpeechRecognitionErrorEvent {isTrusted: true, error: "not-allowed", message: "", type: "error", target: SpeechRecognition, …}

Is it a android problem? How can I make it working?

like image 879
Rick Sanchez Avatar asked Sep 14 '25 15:09

Rick Sanchez


1 Answers

I'm aware that it is a very old question.

In my case problem was caused by an invalid SSL certificate. Desktop Chrome (Linux) was fine with that but Android Chrome was throwing "not-allowed" error. Fixing SSL certificate solved the problem.

like image 109
Kragh Avatar answered Sep 17 '25 06:09

Kragh