pearl
pearl

Reputation: 41

Chrome speech API network error

I'm trying to create a PHP web application using Chrome web speech API. I'm always getting network errors. But, I have a good network connection.

window.SpeechRecognition = window.SpeechRecognition 
                               || window.webkitSpeechRecognition || null;
    if (window.SpeechRecognition === null) {
    } else {
        var recognizer = new window.SpeechRecognition();
        recognizer.continuous = false;
        recognizer.lang = 'en-US';
        recognizer.onstart = function() {
            recognizing = true;
        };
        recognizer.onresult = function(event) {
        };
    }
recognizer.onerror = function(event) { 
            alert(event.error);
            ignore_onend = true;
            if (event.error == 'not-allowed') {
                alert("Allow to access your microphone");
            }
            recognizer.stop();
            recognizer.start();
};

Thanks

Upvotes: 4

Views: 1636

Answers (1)

Cenker
Cenker

Reputation: 29

I have similar problem since the last Google update and I am sure that there is a bug in the last Update. I have similar thread at RecognizerIntent gives error after latest Google Search update My android app gives network error for recognizerintent. Till then, there was no network problem. In summary the error is W/JavaNetConnection﹕ Failed to get connection status. java.io.FileNotFoundException: https://www.google.com/m/voice-search/down?pair=6239918a-dc45-4eea-ac6f-b9bf8de57ced

Upvotes: 1

Related Questions