|
[多端开发]
wxVoicePlus 模块voiceDataRead方法
[复制链接]
wxVoicePlus 模块voiceDataRead方法的使用对于音频的路径有什么特殊要求吗?使用recMp3进行录音,使用audioStreamer模块播放音频是可以的,但在voiceDataRead方法中无法识别音频文件,而startSpeechRecognizer等方法可以实现- var recMp3 = api.require('recMp3');
- recMp3.stop(function (ret, err) {
- if (ret) {
- that.data.answerTime = ret.duration;
- var path = ret.path;
- var wxVoicePlus = api.require('wxVoicePlus');
- wxVoicePlus.voiceDataRead({
- path: ret.path,
- }, function (ret) {
- if (ret) {
- console.log(JSON.stringify(ret));
- }
- });
- }
- });
复制代码
|
|