【问题标题】:Chrome speech API network errorChrome 语音 API 网络错误
【发布时间】:2015-03-11 03:49:29
【问题描述】:

我正在尝试使用 Chrome 网络语音 API 创建一个 PHP 网络应用程序。我总是遇到网络错误。但是,我的网络连接良好。

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();
};

谢谢

【问题讨论】:

标签: google-chrome voice-recognition webspeech-api


【解决方案1】:

自上次 Google 更新以来我遇到了类似的问题,我确信上次更新中存在错误。在最新的 Google 搜索更新后,我在 RecognizerIntent 有类似的线程给出错误 我的 android 应用程序为识别提供了网络错误。到那时,没有网络问题。 总之,错误是 W/JavaNetConnection:无法获取连接状态。 java.io.FileNotFoundException: https://www.google.com/m/voice-search/down?pair=6239918a-dc45-4eea-ac6f-b9bf8de57ced

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-04-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-24
    • 1970-01-01
    • 2017-02-02
    • 2011-10-26
    相关资源
    最近更新 更多