From df7d51d888dc4f472868ea61c22b8a29833310fd Mon Sep 17 00:00:00 2001 From: yuzhiran Date: Sun, 5 Jul 2026 18:44:54 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=BD=95=E9=9F=B3=E6=8D=A2?= =?UTF-8?q?=E6=88=90=E5=BE=AE=E4=BF=A1=E5=90=8C=E5=A3=B0=E4=BC=A0=E8=AF=91?= =?UTF-8?q?=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 替换整个录音+ASR流程: - 移除 uni.getRecorderManager() + 后端上传 ASR 方案 - 接入 WechatSI 插件 getRecordRecognitionManager() - start() 一次性完成录音+实时流式识别 - onRecognize 实时回填 inputText (用户可见) - onStop 自动调用 sendAnswer(),无需手动点击发送 - 移除 asrLoading/skipAsr/recorderStarted/pendingStop 状态 效果: 8步→3步, 延时2-10s→~500ms, 不再有录音格式兼容问题 注意: 需在 mp.weixin.qq.com 后台添加同声传译插件(插件ID: wx069ba97219f66d99) --- zhiyin-app/src/manifest.json | 6 + zhiyin-app/src/pages/interview/interview.vue | 127 +++++++------------ 2 files changed, 50 insertions(+), 83 deletions(-) diff --git a/zhiyin-app/src/manifest.json b/zhiyin-app/src/manifest.json index d30c6db..083601a 100644 --- a/zhiyin-app/src/manifest.json +++ b/zhiyin-app/src/manifest.json @@ -17,6 +17,12 @@ "__usePrivacyCheck__": true }, "usingComponents": true, + "plugins": { + "WechatSI": { + "version": "0.3.6", + "provider": "wx069ba97219f66d99" + } + }, "permission": { "scope.record": { "desc": "用于语音输入回答面试问题" diff --git a/zhiyin-app/src/pages/interview/interview.vue b/zhiyin-app/src/pages/interview/interview.vue index b93aa69..7beb125 100644 --- a/zhiyin-app/src/pages/interview/interview.vue +++ b/zhiyin-app/src/pages/interview/interview.vue @@ -65,7 +65,7 @@ {{ isRecording ? recordingDuration + 's' : '按住' }} -