同声传译插件翻译时长为什么只有40秒
发布于 6 年前 作者 tfu 11407 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)
  • 预期表现
  • 复现路径
  • 提供一个最简复现 Demo

同声传译插件翻译时长为什么只有40秒,超过40秒就不再翻译了

2 回复

//点击开始录音

recordStart: function() {

this.recordStartControl();

wx.showToast({

title: ‘语音识别中…’,

icon: ‘loading’,

duration: 10000

})

manager.start(this.data.tips_language);

},

recordStop: function() {

this.data.end=true;

this.setData({

recordType: {

recordType: ‘recordStop’,

gray: true,

count: this.data.recordType.count,

zongcount: this.data.question.length

}

})

// 识别结束事件

wx.showToast({

title: ‘语义理解中…’,

icon: ‘loading’,

duration: 10000

})

manager.stop();

// this.recordStopControl();

},

initRecord: function() {

var that = this;

//有新的识别内容返回,则会调用此事件

manager.onRecognize = (res) => {

console.log(res)

that.setData({

daan: res.result

});

}

manager.onStart = function(res) {

wx.hideToast()

}

manager.onError = function(res) {

console.error(“error msg”, res.msg);

console.log(res)

that.data.recordresult = that.data.daan;

if (that.data.end){

that.recordStopControl();

}

}

manager.onStop = (res) => {

console.log(“识别结束”);

that.data.recordresult = res.result;

if(that.data.end){

that.recordStopControl();

}

同声传译,语音识别功能时长60s,但是实践发现文字识别在45s左右文字就不在识别,onRecognize,不在返回结果。

官方例子,面对面翻译也是一样。

回到顶部