fix: mp-weixin 录音失败 - 权限声明+authorize+移除TS注解+空音频守卫

- interview.vue: 移除 `let recorder: any` TS 类型注解(小程序构建器不解析 TS,上次修改直接破坏构建从未部署)
- interview.vue: 合并两个 onMounted 调用,删除凭空引入的 refreshState() 未定义函数引用
- interview.vue: startRecord 增加 uni.authorize scope.record 权限预请求,拒绝时引导 openSetting
- interview.vue: recorder.start 改 wav/16kHz/128kbps(旧 aac/22050/16kbps 产生全 0 损坏文件)
- manifest.json: mp-weixin.permission 增加 scope.record 录音权限声明
- tts.controller.ts: ASR 拒绝 <500B 空音频文件,避免 whisper 调 ffmpeg 解码失败刷错日志
This commit is contained in:
yuzhiran
2026-07-05 01:57:24 +08:00
parent 4023c789b1
commit 31703af4f2
3 changed files with 91 additions and 34 deletions
+6 -1
View File
@@ -16,6 +16,11 @@
"urlCheck": false,
"__usePrivacyCheck__": true
},
"usingComponents": true
"usingComponents": true,
"permission": {
"scope.record": {
"desc": "用于语音输入回答面试问题"
}
}
}
}