1***@163.com
- 发布:2017-07-26 17:19
- 更新:2017-07-26 22:01
- 阅读:2311
怎么才能让mui集成的语音识别功能只识别数字
分类:MUI
lhyh - 目前就职成都
function startRecognize() {
if(plus.os.name=='Android'&&navigator.userAgent.indexOf('StreamApp')>0){
plus.nativeUI.toast('当前环境暂不支持语音识别插件');
return;
}
var options = {};
options.engine = 'iFly';
//options.punctuation = false; // 是否需要标点符号
plus.speech.startRecognize( options, function ( s ) {
alert("语音识别结果"+s);
//do sth here
}, function ( e ) {
alert( "语音识别失败:"+e.message );
} );
}
1***@163.com (作者)
怎么才能拿到结果?通过什么函数或方法?
2017-07-26 18:20