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

Aperta Adatta ai principianti
#1,447 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
90/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
testing, tooling

Direzione di ricerca

Inizia con write_voiced in tests/acceptance/showcase/render/synthetic.py, in particolare con il calcolo della durata del cue intorno alle righe 348-349. Confronta il suo comportamento con storyboard.min_cue_ms(cue) e con la durata minima del cue della cattura reale. Aggiorna la durata del cue sintetico e aggiungi un test di accettazione che utilizzi una board il cui titolo richiede una pausa più lunga; la cattura sintetica dovrebbe quindi superare il controllo della cattura.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
0
Fork
4
Merge medio
5h 19m
PR unite (30g)
503

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Controlvar/controlvar

Tutte le issue di Controlvar/controlvar

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.