4

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

halfer
  • 19,824
  • 17
  • 99
  • 186
pearl
  • 41
  • 5
  • Please include your source code in the question. Please see [What topics can I ask about here?](http://stackoverflow.com/help/on-topic), [How do I ask a good question?](http://stackoverflow.com/help/how-to-ask) and [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve). – Makyen Jan 13 '15 at 08:44
  • This appears to be of-topic. It either is asking for debugging help without including enough information to debug, or it is about general networking issues. – Makyen Jan 13 '15 at 08:45
  • @Makyen I'm using above code. Please help – pearl Jan 13 '15 at 08:50
  • Please provide the exact error-text from the errors which you are experiencing. – Makyen Jan 13 '15 at 09:04
  • @markyen It just returns "network" from event.error – pearl Jan 13 '15 at 09:20

1 Answers1

1

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

Cenker
  • 29
  • 6