Skip to content

Captions clear in the quiet parts of a clip (#228) - #231

Open
ColinGPT9 wants to merge 2 commits into
editor-suite/step-3-caption-fontsfrom
fix/228-captions-clear-in-pauses
Open

ColinGPT9 wants to merge 2 commits into
editor-suite/step-3-caption-fontsfrom
fix/228-captions-clear-in-pauses

Conversation

@ColinGPT9

Copy link
Copy Markdown
Owner

Closes #228. Stacked on #230 (editor suite step 3).

The problem

A caption was a fixed group of words (3 by default), shown from its first word's start to its last word's end. When someone paused inside a group, the caption stayed on screen for the whole pause. A word the transcript stretched over a silence did the same.

The fix

It is the default behaviour, with no setting and no new UI text.

  • A pause of more than 0.8 seconds ends the caption, and the next word starts a new one.
  • A single word keeps a caption up for at most 1.2 seconds.
  • A word the transcript timed with no length, next to a pause, gets a short caption of its own (0.4 seconds) instead of holding the caption through the pause.
  • The editor groups words the same way, so what it shows matches the render.
  • Captions edited by hand keep their times.

Measured

On a real 150-second transcript, burned and measured frame by frame:

Words per caption Longest silent stretch under a caption, before After
3 4.6 s 0.8 s
6 8.1 s 0.8 s

Caption time on screen while nobody is speaking fell from about 31 s to about 7 s over 113 s of video (3 words per caption). What remains is breaths shorter than 0.8 s.

What stays the same

Where there is no pause over 0.8 s and no word over 1.2 s, the output is byte-identical: 17,898 line and ASS comparisons, 132 burned clips with identical frames, no snapshot changed, and the four golden renders match.

Checks

  • QC and a burned-frame review (90 burns across 15 caption styles), one fix round, then both re-run: passed.
  • Caption, speaker, snapshot and Python/TypeScript parity tests pass; ruff, typecheck and build pass.
  • The full suite the CI way shows only the known Windows-only failures.

Known limits

  • A stretched word in the middle of a sentence can leave a blank of a few tenths of a second before the next caption.
  • Text without word timings now also ends a caption at a silent gap over 0.8 s between two segments.
  • With the second speaker's colour on, a word the transcript wrote longer than 2.4 s can change colour after a word is muted or retyped in the editor. Not seen on real transcripts.
  • Not yet looked at by eye in the app on real footage.

Not for merging yet: waiting for the owner's click-through.

🤖 Generated with Claude Code

A caption was a fixed group of words, shown from its first word's start
to its last word's end, so a pause inside the group kept it on screen.

- A pause of more than 0.8 s ends the caption; the next word starts a
  new one.
- A word counts for at most 1.2 s after its start, so a word the
  transcript stretched over a silence no longer holds a caption up.
- A word timed with no length beside a pause gets a 0.4 s caption of
  its own instead of holding the caption through the pause.
- The editor's copy of the grouping (speakerTurns.ts) does the same;
  the Python/TypeScript parity tests cover pauses and long words.
- Lines saved by hand keep their times. No setting and no new UI text.
- With no pause over 0.8 s and no word over 1.2 s the output is
  byte-identical: no snapshot changed and the golden renders match.

Checked: QC and a burned-frame review, one fix round, both re-run
afterwards and passed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clips-kitty-web Ready Ready Preview Nov 12, 2026 4:28am UTC
1 Skipped Deployment
Project Deployment Actions Updated
clips-studio Ignored Ignored Preview Nov 12, 2026 4:28am UTC

The name was built from the process and thread ids in hex, which on
Linux is longer than the font's own file name, so the step 3 test for
long clip folders failed in CI. It is now 13 characters everywhere.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@pauldietrichh7-afk

Copy link
Copy Markdown

Hey Collin ich hätte ein paar Fragen? Wie erreicht man dich am besten

@ColinGPT9

Copy link
Copy Markdown
Owner Author

I check github issues everyday and I have my social media links at the bottom of the github

This branch was successfully deployed

1 active deployment
Preview – clips-kitty-web — 366d4879 Deployed Nov 12, 2026 by vercel[bot]
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.

2 participants