我正在尝试使用节点Webkit语音识别API,但它给了我一个奇怪的行为。我像这样初始化记录器:
var rec = new webkitSpeechRecognition();
rec.continuous = true;
rec.interimResults = true;
rec.onresult = function(e){ alert('result') };
rec.onstart = function(e){ alert('start') };
rec.onerror = function(e){ console.log(e); };
rec.onend = function(e){ alert('end') };
rec.onspeechstart = function(e){ alert('speechStart') };
rec.start();
但是start()
通话后没有任何反应。唯一有效的插槽是end()
我无法弄清楚的一个插槽,而我无法弄清楚其他插槽...我在失去什么?
我浏览了这个Github问题(对于台式机应用程序是webkitSpeechRecognition?),但是找不到任何有用的信息。
webkitSpeechRecognition需要后端语音识别系统。
Chrome可能会使用Google的语音识别系统。因此,我们可以在Chrome上轻松使用webkitSpeechRecognition。但是即使在其他基于Webkit的应用程序上,也可能无法正常工作。
我认为在支持Google或某人的引擎之前,很难在node-webkit上使用语音识别功能。
也CHANGELOG 0.8.0 / 10-30-2013说
-在支持之前取消定义window.webkitSpeechRecognition
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句