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

130 views Asked by At

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

There are 0 answers