Skip to content

重构:将语音评估脚本收口到 scripts - #2576

Open
MomiJiSan wants to merge 2 commits into
mainfrom
codex/voice-tools-to-scripts
Open

重构:将语音评估脚本收口到 scripts#2576
MomiJiSan wants to merge 2 commits into
mainfrom
codex/voice-tools-to-scripts

Conversation

@MomiJiSan

@MomiJiSan MomiJiSan commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

摘要

  • tools/voice_eval/prepare_voice_turn_assets.py 平铺迁移为 scripts/prepare_voice_turn_assets.py
  • tools/voice_eval/evaluate_smart_turn_v3.py 平铺迁移为 scripts/evaluate_smart_turn_v3.py
  • 同步桌面构建、Docker、设计文档及测试中的所有调用路径
  • 仅调整脚本归属与项目根解析,不修改模型目录、manifest 模块、下载/校验逻辑或运行时行为

风险与边界

这是可独立回滚的纯路径整理。GitNexus 评估为 LOW,未命中任何生产执行流。后续 endpointing 与模型资产迁移将作为堆叠的独立 PR 提交,避免在本 PR 留下半迁移状态。

验证状态

  • 相关构建合同、裸 Python preparer、评估脚本单测:17/17 通过
  • 两个脚本 --help:通过
  • Ruff、git diff --check:通过
  • 全仓旧路径扫描:tools/voice_evaltools.voice_eval 零残留
  • 根目录全量 pytest 被仓库既有的两个同名插件 test_smoke.py 收集冲突阻断;项目主测试树已另行启动,最终结果将随 CI 一并跟进

Summary by CodeRabbit

  • 改进
    • 优化语音回合(VAD + Smart Turn)离线资源的准备与打包流程。
    • 提升桌面与 Docker 镜像构建时资源校验的一致性与稳定性。
    • Smart Turn v3 评估工具可在新的项目结构下正常使用。
  • 文档
    • 更新 Smart Turn v3 资源准备与评估流程说明。

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 625b3181-18f3-4314-8531-9c7e44a8d7ee

📥 Commits

Reviewing files that changed from the base of the PR and between 4b94e7c and e454198.

📒 Files selected for processing (1)
  • tests/unit/voice_turn/test_prepare_assets.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • Project-N-E-K-O/N.E.K.O.-PC (manual)

Walkthrough

本次变更将 voice-turn 资产准备和 Smart Turn 评估脚本迁移至 scripts 目录,并同步更新脚本根路径、构建配置、Dockerfile、设计文档及单元测试中的路径引用喵。

Changes

Voice-turn 脚本迁移

Layer / File(s) Summary
脚本入口与根路径调整
scripts/*.py, docs/design/smart-turn-v3-provider-neutral.md
更新脚本根目录解析,并将文档中的资产准备与评估命令改为 scripts 路径喵。
构建链路调用迁移
.github/workflows/*, docker/Dockerfile*
桌面构建、多架构构建及 Docker 构建中的 voice-turn 资产准备调用改用新脚本路径喵。
构建契约与脚本测试同步
tests/unit/voice_turn/*
更新构建配置断言、评估工具导入、资产准备脚本路径及子进程工作目录喵。

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: enhancement

Poem

脚本搬家步轻盈,喵
构建流水线紧相随,喵
Docker 入口换新装,喵
测试断言也对齐,喵
Smart Turn 顺利起航,喵

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 标题准确概括了将语音评估脚本迁移到 scripts 的主要变更喵
Description check ✅ Passed 描述已覆盖摘要、风险边界与验证状态,整体符合模板要求喵
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the enhancement New feature or request label Jul 30, 2026
@greptile-apps

greptile-apps Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

本 PR 将语音评估与资源准备脚本统一迁移到 scripts/ 目录喵。

  • 同步更新桌面构建、Docker 构建、设计文档及测试中的调用路径喵。
  • 调整两个脚本的项目根目录解析,以保持迁移前的运行行为喵。
  • 更新测试导入和构建合同断言,覆盖新的脚本位置喵。

Confidence Score: 5/5

当前变更未发现仍需阻止合并的故障,看起来可以安全合并喵。

未发现仍然存在的阻塞性失败喵。

Important Files Changed

Filename Overview
scripts/prepare_voice_turn_assets.py 资源准备脚本迁移到 scripts/,并将项目根解析调整为匹配新的目录深度喵。
scripts/evaluate_smart_turn_v3.py Smart Turn v3 评估脚本迁移到 scripts/,其项目根解析保持正确喵。
tests/unit/voice_turn/test_prepare_assets.py 测试导入、脚本路径及子进程工作目录已同步到新位置喵。
tests/unit/voice_turn/test_build_contracts.py 构建合同断言已更新,覆盖工作流和 Dockerfile 中的新调用路径喵。
.github/workflows/docker-multi-arch.yml 两个多架构镜像构建任务均改为从 scripts/ 调用资源准备脚本喵。
docker/Dockerfile 标准镜像在完整源码复制后通过新路径执行资源准备脚本喵。
docker/Dockerfile.full 完整镜像在完整源码复制后通过新路径执行资源准备脚本喵。

Reviews (2): Last reviewed commit: "fix(tests): unify voice asset preparer i..." | Re-trigger Greptile

Comment thread tests/unit/voice_turn/test_prepare_assets.py Fixed
@MomiJiSan

Copy link
Copy Markdown
Contributor Author

合并顺序说明:请先合并 #2396,再合并 #2576

#2396 是 Phase 4A 的语音设置与受控 ASR consumer routing 主体变更;#2576 只负责后续的语音评估工具目录收口(tools/voice_evalscripts)及引用更新。先落主体、再落路径重构,可以减少路径回退、冲突和重复审查。

#2396 合并后,应基于最新 main 再确认 #2576 的路径引用、冲突与 CI,然后再合并 #2576

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant