|
本帖最后由 Cover-L 于 2021-12-16 10:13 编辑
apiready()中
iflyRecognition.createUtility({
ios_appid: 'xxxxxxxx', // 填写讯飞平台上获得的appid
android_appid: 'xxxxxxxx' // 填写讯飞平台上获得的appid
}, function (ret, err) {
if (ret.status) {
console.log("创建成功");
} else {
console.log("创建失败");
}
});
方法中
开始
iflyRecognition.record({
vadbos: 5000,
vadeos: 5000,
rate: 16000,
asrptt: 1,
audioPath: this.data.path
}, function (ret, err) {
if (ret.status) {
console.log(JSON.stringify(ret));
console.log(JSON.stringify(ret.wordStr));
if (ret.wordStr) {
that.data.wordstr = ret.wordStr
}
} else {
console.log(JSON.stringify(err));
}
});
停止
iflyRecognition.stopRecord();
希望看到请尽快回复,不要又等个一两天,
|
|