// 代码:
app.json
"plugins": {
"WechatSI": {
"version": "0.3.4",
"provider": "wx069ba97219f66d99"
}
}
index.js
var plugin = requirePlugin("WechatSI")
let manager = plugin.getRecordRecognitionManager();
onLoad: function (options) {
console.log(111222, 'init');
manager.onStop = function (res) {
console.log('manager.onStop', res)//语音识别信息打印
};
manager.onRecognize = function (res) {
console.log(222, 'manager.onRecognize', res)
};
manager.onError = function (res) {
console.log(333, 'manager.onError', res)//报错信息打印
};
},
// 长按录音
touchdown_plugin: function() {
console.log('开始录音');
manager.start({
duration: 30000,
lang: "zh_CN"
});
},
//手指松开
touchup_plugin: function() {
console.log('停止录音');
manager.stop();
},
官方能不能回复一下