帖子
帖子
用户
博客
课程
显示全部楼层
114
帖子
2
勋章
570
Y币

[插件使用] iflyRecognition语音识别问题

[复制链接]
发表于 2021-12-14 09:50:35
使用该模块的语音转文字功能,经常会只截取了其中一段文字,没有得到全部转换后的内容
380
帖子
4
勋章
6
Y币
代码怎么写的?参数都设置的合适吗
114
帖子
2
勋章
570
Y币
本帖最后由 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();

希望看到请尽快回复,不要又等个一两天,
技术支持-F · 2021-12-15 19:55代码怎么写的?参数都设置的合适吗

5
帖子
0
勋章
55
Y币
请问代码里面that.data.wordStr是什么啊
您需要登录后才可以回帖 登录

本版积分规则