Speech recognition is not working in OnePlus device

I am trying to implement speech to text and it is working on most of the devices except the Oneplus (Android 11).

from this URL – https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition

if (window.hasOwnProperty('webkitSpeechRecognition')) {

    var recognition = new webkitSpeechRecognition();

    recognition.continuous = false;
    recognition.interimResults = false;
    recognition.lang = "en-US";
    recognition.start();
    recognition.onstart = function(e) {
        recognizing = true;     
        startImgThree.src = './images/mic-animate.gif';
      };
    recognition.onresult = function (e) {
        document.getElementById('transcriptthree').value = e.results[0][0].transcript;
        recognition.stop();
        document.getElementById('labnol').submit();
    };
    recognition.onerror = function (e) {
        recognition.stop();
    };
    recognition.onend = function(e) {
        recognizing = false;
        startImgThree.src = './images/mic-inactive.png';
}
}

where is the mistake please help me with that