This commit is contained in:
liuye
2023-12-25 15:19:21 +08:00
parent 9d2809de55
commit a6c4c79e5a

View File

@@ -55,13 +55,13 @@ export default {
this.isStart = true this.isStart = true
}, },
end() { end() {
this.isStart = false
wx.stopRecord({ wx.stopRecord({
success: (res)=> { success: (res)=> {
wx.translateVoice({ wx.translateVoice({
localId: res.localId, // 需要识别的音频的本地Id由录音相关接口获得音频时长不能超过60秒 localId: res.localId, // 需要识别的音频的本地Id由录音相关接口获得音频时长不能超过60秒
isShowProgressTips: 1, // 默认为1显示进度提示 isShowProgressTips: 1, // 默认为1显示进度提示
success: (e)=> { success: (e)=> {
this.isStart = false
this.text = this.text + e.translateResult // 语音识别的结果 this.text = this.text + e.translateResult // 语音识别的结果
this.confirm() this.confirm()
} }