Skip to content

fix(recording): 校验实时 ASR 完整性并补齐长录音归档恢复链路 - #1494

Merged
appergb merged 8 commits into
betafrom
fix/xfyun-resampler-aoci-index
Nov 26, 2026
Merged

appergb merged 8 commits into
betafrom
fix/xfyun-resampler-aoci-index

Conversation

@appergb

@appergb appergb commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

录音停止时,发送队列排空或已有部分文字不足以证明整段音频已完成识别。本变更使讯飞、火山、百炼、Qwen Realtime 和 StepFun 的音频及结束操作按序执行,记录成功写入覆盖量并传播发送失败;长会话拒绝用部分结果冒充完整成功,短会话保留有界兼容兜底。

  • 基础降采样增加跨块有状态抗混叠滤波,分别验证高频抑制和块边界一致性。
  • 稳定模式仅在有健康的处理后音频归档时,于 8 MiB 后改用归档重放;原始调试归档继续使用增强后的内存音频及原有容量停止保护;恢复、本地兜底和历史重转录采用范围读取,减少 Whisper PCM/WAV 中间复制。历史入口兼容 RIFF 元数据块并拒绝短读(补充 2 字节 sample 对齐与 checked_add 边界保护)。Linux、iOS、桌面和远程归档均实现真实范围读取及规范 WAV 校验;桌面与 Linux 范围 I/O 在阻塞任务中执行,iOS 保留原有安全文件校验。
  • WAV 待写队列限制为 32 MiB(超限报错按实际 max_queue_bytes 格式化),冷/热采集向上反馈容量、写盘、头部及同步错误,并在共享执行器上调用 Core 异步清理,停止采集、取消识别并释放会话;租约保护正在使用的归档(含桌面端播放与导出对话框期间),discard() 成功或未找到时立即释放租约,停录等待原始与处理后档案结算。追加失败后,Finalize/Drop 仍尝试修复已保存 PCM 的 WAV 长度,始终保留首个错误并拒绝后续追加;可播放片段不能当作完整录音。
  • 拒绝少于 100 ms 的有效 PCM,统一长录音草稿和引擎的采样时长门槛;更新长录音合同及 AOCI。
  • 短会话部分结果挽救与 cancel() 的并发锁边界收敛为单锁原子完成,并在挽救失败或空白结果时保留 retryable = true 以触发归档恢复重试。
  • 补齐 beta 遗漏的共享配置、LLM builder 和胶囊 processing jobs 接口,修正重复声明及已删除模块引用。胶囊取消操作绑定实际显示会话。高级设置只挂载一个润色策略面板,避免重复开关及编辑器。
  • 对齐 iOS 隔离补丁与当前共享源码,更新 Harmony IPC 审计,修正受接口及排版影响的合同夹具。删除重复注册的历史浏览器测试,以及引用已退役 QaPanel 的旧 UI 测试路径;新版 Ask 由现有 Ask 窗口测试覆盖。

验证:Core 库及集成套件共 1,931 项、桌面库 779 项、原生录音 110 项已通过。iOS 真实 prepare-core 隔离流程、隔离 Core 1,687 项、iOS Host 76 项及 clippy --all-targets -- -D warnings 通过。前端构建及合同脚本通过;所选胶囊、历史、Ask 浏览器套件 106 项经 Chromium/WebKit 验证,其中两条 WebKit 亚像素中心对齐断言改用 0.5 CSS px 容差后跨浏览器 4 项重跑通过。31 分钟稀疏 WAV 尾部范围读取、短读拒绝、git diff --check、Harmony 审计重生成一致性及 AOCI aligned 检查通过。独立 backend-tests 工程已通过本地 --locked 全量编译,翻译/快捷键测试 51 项及相关接口合同通过;Windows 选区预览调用已与同步宿主接口对齐。设置页的原 6 个 CI 失败项已在 Chromium/WebKit 双浏览器重跑,12 项通过;涵盖策略编辑、导航、快捷键清空及异步权限返回检查。

收尾提交 ea574db 验证:修改涉及文件经 rustfmt --edition 2021 格式化,openless-core 目标回归 140 项(含 finalize_streaming_transcript、volcengine/xfyun/bailian/qwen_realtime/stepfun_realtime 与 long_recording)、openless 桌面归档与范围回归 10 项(含 TauriRecordingArchive 头部/对齐/故障/租约测试与 HistoryWavArchive 边界测试)、openless-backend-tests 全量集成测试、4 项 Node 合同脚本、prepare-core.py 隔离补丁、openless-core 严格 Clippy(--lib --tests -- -D warnings)、git diff --check、敏感信息扫描及 aoci_maintain/aoci_update_entry 对齐均已本地通过;提交 ea574db8 的云端检查已完成:15 项成功、1 项可选官方供应商真实验收按配置跳过;Codex 自动代码审查完成,无新问题和未解决讨论。

归档回归:普通原生线程触发磁盘故障后,Core 取消、失败历史持久化及重新录音准入测试通过;桌面、Linux、iOS、远程生产适配器的范围读取、边界及截短拒绝测试通过,远程输入 17 项合同测试及 iOS all-targets 严格 Clippy 通过。Linux 归档适配器由 Core 集成测试独立编译验证,不代表完整 Linux 原生后端或硬件验收。

边界:本地源码/夹具结果不等于真实设备或供应商长时间验收。腾讯云实时 ASR 尚未接入 finalize_streaming_transcript 覆盖率校验与稳定模式归档重放节流,留作后续跟进;火山 45000081/45000000、设备冷启动、Windows 嗡鸣仍为根因待查;Omni、iOS 容量策略、Linux 写盘解耦、语句边界质量及润色续跑仍有后续工作。

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T04:41:07.801674Z ea574db New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0b448c45af

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8f477f8864

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d4d2a00054

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

lvbaiqing added 4 commits November 24, 2026 19:28
… leases

- Reuse canonical WAV header/range helpers and lease cleanup in TauriRecordingArchive
- Preserve retryable=true on short-session salvage misses and resolve send faults atomically across 5 streaming ASR providers
- Enforce even alignment and checked offsets in HistoryWavArchive; hold leases during audio playback and export
- Format recorder queue cap dynamically, document TencentCloud streaming boundary, and align AOCI index
@appergb
appergb merged commit c5f2987 into beta Nov 26, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant