Repository navigation
fix(voice): 修复录音中断与取消,补齐 Windows 音频验收 - #98
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
模拟面试录音在设备断开、录音器自然停止、权限迟返回或转写长时间无响应时,可能卡在录音状态,或在页面退出后继续采集/回填文字。旧的 1000 字节判断还会把一秒多的静音 Opus 录音误报为“内容太少”。
本次统一管理单次录音的权限、轨道、录音器、音量检测和转写生命周期;在中断、取消、切题、结束或卸载时释放资源并屏蔽迟到结果。转写设为 60 秒超时,保留已有鉴权及额度错误处理。增加麦克风选择、实际设备名、输入音量与取消操作,让用户能判断权限允许后是否实际采集到声音;编码与文件扩展名保持一致。
Related to #95。原反馈没有实际设备、日志和客户端版本;本 PR 验证公开社区源码及合成音频链路,官方云客户端仍需同步修复并按验收清单在受影响设备复测,因此不自动关闭 issue。
验证
bun run check:605 个后端测试、75 个前端测试通过;类型、边界、Lint、Web/API/Electron 构建及 Windows 应用目录打包通过。Lint 有存量警告,零错误。bun run check:frontend、Bun/Node 类型检查。bun run smoke:voice:Windows x64、Electron 43.4.1 / Chromium 150.0.7871.224,实际 Interview 页面通过 8 类场景、9 次合成 WebM 上传。覆盖简历面试与专项训练、有声/静音音量、文字回填、错误重试、原生轨道停止和取消后无迟到回填。静音 WebM 实测仅 519 字节,已验证不会再被误报为录音太短。验收脚本使用合成 WAV 和本地模拟 ASR,不采集物理麦克风、不调用付费服务。物理麦克风、蓝牙驱动和官方云端 ASR 的发布后验收步骤见 验收清单。
界面