Repository navigation
What you have to build after Whisper to get usable subtitles (segmentation, frame snapping, word timing) #2857
quietbin
started this conversation in
Show and tell
Replies: 1 comment
|
Two small regression cases for that transcript-to-subtitle boundary, from our own exporter. I work on Veyrul; this is a founder-run check, not an independent endorsement or a test of suubbs.
The pinned source and ten static checks are public. No ASR accuracy or rendered quality was measured. Do you reject, merge, or expand cues that collapse at the target clock? A concrete boundary case could make a useful shared regression fixture. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Sharing a project, and mostly the part that surprised me: getting good text out of Whisper turned out to be maybe a third of the work of getting usable subtitles out of it.
suubbs is a macOS subtitle editor built on Whisper. Drop in a video, get word-timed cues, fix them against the picture, export SRT/VTT/ASS. It's a paid app ($3.99 one-time) — saying so up front.
The gap between a transcript and a subtitle track
Whisper hands you segments. Subtitles need cues, and they aren't the same object. The things that had to be built on top:
Segmentation isn't sentence-splitting. A cue has to be readable in the time it's on screen. The constraint is characters-per-second, not grammar, so a correct sentence is frequently a bad cue and has to be split at a place the speaker didn't pause. Splitting on punctuation alone produces cues that flash past unreadably.
Frame snapping. A cue boundary that isn't on a frame boundary gets rounded by whatever plays it back, and different players round differently. At 23.976fps that's visible drift. I spent an embarrassing amount of time treating this as a transcription accuracy problem before realising the timestamps were fine and the rounding was the bug. Reading the real frame rate out of the container and snapping to it fixed a whole class of "feels slightly off" reports.
Word timing is a different problem from segment timing. Whisper's segment timestamps are good. Interpolating within a segment to get per-word timing is not, if you actually highlight words as they're spoken — being 100ms early is clearly visible on the beat. DTW over the cross-attention weights gets that to about 3ms; interpolation lands around 60–140ms. For writing an SRT nobody notices. For karaoke-style highlighting it's the entire feature.
The browser part, which may be the more interesting thing here
The same editor is compiled for the browser, running Whisper via Transformers.js on WebGPU — no install, no server, no API key. If you've only run Whisper from Python it's a slightly startling thing to see work in a tab: https://suubbs.com/app
Open DevTools and watch the Network panel while it transcribes. It stays empty after the one-time model fetch from the HuggingFace CDN. That's the whole privacy argument, and it's checkable in under a minute rather than something you have to take on trust.
Happy to go into the segmentation heuristics or the DTW alignment if either is useful to anyone.
All reactions