我需要你的帮助我不知道如何解决我的问题 . 我有应用程序写在离子和我使用annyang语音识别听取用户说和响应 . 它在网络上工作得很好 - 使用离子服务,但是当我在Android设备上运行语音识别需要花费很长时间从30秒到几分钟 - 我只说一个单词,例如“shop” .

这是减少这个时间的方法吗?或者我可以设置任何超时?

我会感激任何帮助 . 谢谢 .

编辑:代码看起来像

//response is array of strings (three words)
        _.forEach(response, function (item) {
            annyang.addCommands(item,function(itme){
                 //check Something
            });            
        }

        annyang.start();

Edit2:这是同样的,为了重新开始,我必须等待2分钟

var recognition = new SpeechRecognition();
recognition.onresult = function(event) {
  console.log(event)
}
recognition.start();