Repository navigation
release: 2.0.1 - #59
Merged
Merged
Conversation
2.0.0 的 VAD 分段在长音频上有两个问题,本次一并修复: 1. GPU 卡死:VAD 原跟随转录设备上了 CUDA。但 silero VAD 是 LSTM,隐状态 在时间步上串行依赖(窗口 N 必须等 N-1 的 hidden state),架构上无法沿 时间轴并行 / 批处理——这是 GPU 跑不起来的主因(逐窗口 CPU↔GPU 同步 + kernel launch 开销是次因)。改为固定 CPU:实测 ~119x 实时,4 小时音频 约 2 分钟扫完(silero 的 model.py 亦 set_num_threads(1)、官方建议跑 CPU)。 2. 日志错序 + 看似卡死:VAD 的加载与全程扫描原在 transcribe_segmented 生成器 内部,而生成器惰性,转录进度条已显示 0% 才轮到 VAD 跑,顺序反了、且无进度。 拆成两段式:plan_audio()(探时长 + VAD 探间隙 + 规划,在进度条创建前跑完、 普通 print 输出含 VAD 百分比进度)+ transcribe_segments()(拿预规划的段逐段 转录、走进度条)。VAD 模型加载日志现于转录进度条之前打完,不再冲乱进度条。 接 silero 的 progress_tracking_callback 回报扫描百分比(节流每 10% 一行)。 方法重命名 transcribe_segmented → plan_audio + transcribe_segments,cli 调用与 文档(README / CLAUDE.md)同步更新。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
长音频 VAD 扫描原本逐 10% 打印一行(VAD 扫描 10%/20%...),刷屏且不直观。 改为一个 0~100% 的 tqdm 进度条:plan_audio 收一个进度条工厂 make_bar(cli 传 _make_bar,transcriber 不直接依赖 tqdm、保持解耦),silero 回调驱动进度条推进。 该条在 plan_audio 阶段(转录进度条之前)起停,两条顺序出现、互不冲突。 VAD 模型先单独 load() 再建条,使加载日志在进度条之前打完、不冲乱进度条。 无工厂时(无终端 / 测试)回退逐 10% 打印。修了进度计数 off-by-one(last_pct 初值 -1 致首回调多推 1 格、结尾显示 101%),改初值 0 后正好止于 100%。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
修复 2.0.0 引入的 VAD 长音频卡死(VAD 改固定 CPU)、日志错序(VAD 规划阶段 前置到转录进度条之前),并把 VAD 扫描改为 0~100% 进度条。无对外 API / CLI 变更, 按 SemVer 为 patch。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix: VAD 长音频卡死 + 日志错序,VAD 扫描进度条,断句优化 (2.0.1)
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.
2.0.1
修复 2.0.0 引入的 VAD 长音频回归,并打磨 VAD 扫描体验。
修复
plan_audio()规划阶段、在转录进度条创建之前跑完。改进
无对外 CLI / API 变更,SemVer patch(2.0.0 → 2.0.1)。
验证
全量测试 175 passed,ruff 干净,VAD 端到端冒烟通过。
详见 v2.0.0...dev