帖子
帖子
用户
博客
课程
显示全部楼层
7
帖子
0
勋章
23
Y币

[BUG] speechRecognizer模块ios里面保存的文件无法播放

[复制链接]
发表于 2018-4-18 11:16:31
本帖最后由 stonemx 于 2018-4-18 11:18 编辑

var speechRecognizer = api.require('speechRecognizer');
speechRecognizer.record({
    vadbos: 5000,
    vadeos: 5000,
    rate: 16000,
    asrptt:1, // 0没有标点符号,1有标点符号
    audioPath: 'fs://2.pcm'
}, function(ret, err) {
    if (ret.status) {
        api.startPlay({
    path: 'fs://2.pcm'
}, function(ret2, err2) {
    if (ret2) {
  
        //objtxt.html(JSON.stringify(ret2));

    } else {
这里报错  {"msg":"an error occurred"}
        //objtxt.html(JSON.stringify(err2));

    }
});

    } else {
        objtxt.html(JSON.stringify(err));
    }
});
安卓端没有问题,苹果端文件保存了,但是保存的文件无法播放

2
帖子
0
勋章
2271
Y币
您好,用下面模块,转换为mp3文件再播放

https://docs.apicloud.com/Client-API/Func-Ext/audioTrans
您需要登录后才可以回帖 登录

本版积分规则