macdonst / SpeechRecognitionPlugin

W3C Web Speech API - Speech Recognition plugin for PhoneGap
MIT License
187 stars 97 forks source link

recognition.onresult() and end() event fails to tirgger in devices #97

Open manjudr opened 7 years ago

manjudr commented 7 years ago

Description Below snippet, I have written I am facing recognition.onresult() event fails to trigger in the devices I couldn't able to identify what is the issue.

Device details Andorid version - 5.0.1 Model number - Lenova TAB 2A7-20HC


 var recognition;
        if ("undefined" != typeof cordova) {
            document.addEventListener('deviceready', onDeviceReady, false);
            function onDeviceReady() {
                recognition = new SpeechRecognition();
                recognition.start();
                recognition.onend = function() {
                    recognition.start();
                };
                recognition.onresult = function(event) {
                    if (event.results.length > 0) {
                        value = event.results[0][0].transcript;
                        console.info('speech value', value);
                        instance.dispatchspeechTextEvent(value);
                    }
                };

            }
        }```
ahmadalzoubi13579 commented 2 weeks ago

@manjudr I have the same issue, any update ?