Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

duonghv's avatar

Web speech api not working on android chrome and some safari version

I'm trying to use Web speech api to reconige text. It works perfectly on desktop chrome and iphone 14 safari. But on android chrome and iphone 10 safari, it doesn't work. I tried with ssl. Problem is event onresult doesn't work.

if ('SpeechRecognition' in window || 'webkitSpeechRecognition' in window) {
    const sr = window.SpeechRecognition ||window.webkitSpeechRecognition;
    recognition.value = new sr();
    recognition.value.continuous = true;
    recognition.value.interimResults = true;
    recognition.value.onresult = handleRecognitionResult;
}

How to fix this, thanks

0 likes
0 replies

Please or to participate in this conversation.