Showcase tool: the synthetic writer does not hold a cue for its headline's reading time, so the render refuses it

未关闭 适合新手
#1,447 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
90/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
testing, tooling

调研方向

从 tests/acceptance/showcase/render/synthetic.py 中的 write_voiced 开始,尤其关注第 348-349 行附近的 cue 时长计算。将它的行为与 storyboard.min_cue_ms(cue) 以及真实 capture 的最小 cue 持续时间进行比较。更新合成 cue 的时长,并添加一个 acceptance 测试,使用标题需要更长保持时间的 board;合成 capture 随后应通过 capture gate。

由索引模型根据 Issue 内容生成。

描述

The showcase tool's synthetic writer (tests/acceptance/showcase/render/synthetic.py, write_voiced) is meant to produce a narrated capture "that passes every gate" (its docstring, line 326). For some storyboards it produces one that the render refuses.

What happens

write_voiced sizes each caption cue as the sum of its sentences' slots (line 348), plus an extra on every third cue (line 349). It never holds a cue for its headline's minimum reading time.

The real capture does hold a cue for storyboard.min_cue_ms(cue): the headline's reading time plus a margin. So when a cue's headline needs longer to read than its sentences take to say, the render's capture gate refuses the synthetic capture.

Measured on video 9's board, 09-design-in-depth:

cue 1: 54 characters and 10 words in 2.067 s, needs 3.834 s

The cue is "Choose New Experiment." under a 54-character headline. Video 1's board has no such cue, which is why it renders.

Expected

write_voiced holds every cue for at least min_cue_ms, as the capture does. For example, after line 349:

length = max(length, contract.frames_for_ms(storyboard.min_cue_ms(headline)))

Evidence

  • With that one line applied, video 1's synthetic capture is byte-identical to its capture without it.
  • On video 9's board, only cue 1 grows, by 56 frames, and every later cue shifts by the same amount.
  • Integrated loudness moves by 0.01 LU, because the added silence falls below the loudness gate.

A test should load a board with such a cue and assert that the synthetic capture passes the capture gate.

主要语言
Python
星标
0
派生
4
平均合并
5 小时 36 分钟
30 天内合并 PR
509

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Controlvar/controlvar 的其他 Issue

查看 Controlvar/controlvar 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。