Skip to main content

Word-Level Timestamps for Animated Captions: Parakeet vs Whisper on a CPU Server

Updated 4 min readMarkdown
Word-Level Timestamps for Animated Captions: Parakeet vs Whisper on a CPU Server

I'm building AutoCaptions, a tool that adds animated, word-by-word captions to short videos. Everything starts with one requirement: a start time for every word. Sentence-level timing is fine for subtitles, but a word can't light up on cue if you don't know when it was said.

The constraint was cost. Transcription runs on a single ARM server with no GPU, shared with other sites. Here's what I tried and what I ended up shipping.

The benchmark

I benchmarked a handful of open models on clips that look like real uploads: YouTube-style talking heads, a noisy call, accented speech. Three made the cut, one per job:

Mode Model Speed on the box Good at
fast Parakeet TDT 0.6B v2 (int8, ONNX) ~7x realtime clean English, YouTube-style audio
accurate Whisper distil-large-v3 ~1.4x realtime accents, noisy calls
multi Whisper large-v3-turbo ~0.9x realtime 99 languages, auto-detect

Parakeet was the surprise: much faster than Whisper on CPU, and better on the audio most creators upload. It became the default. Whisper stays for the cases where it's clearly better, via faster-whisper.

All three are loaded lazily on first use and kept in memory; together they fit in about 3 GB.

Problem 1: Parakeet and long audio

Parakeet attends over the whole input. On a 5-minute clip, memory peaked at 3.3 GB and the worker got OOM-killed. It was also slower than processing the same audio in pieces.

Its built-in VAD mode would split the audio for me, but it drops word timestamps, which defeats the point. So I cut the audio myself, into pieces of at most 60 seconds. Peak memory dropped to about 1.6 GB.

Cutting blindly at 60 s would split words in half. Instead, each cut lands at the quietest 100 ms window in the last 10 seconds of the piece:

def split_quiet(a, win=60, look=10):
    i, hop = 0, SR // 10
    while len(a) - i > win * SR:
        lo = i + (win - look) * SR
        energy = (a[lo:lo + look * SR].reshape(-1, hop) ** 2).mean(axis=1)
        cut = lo + int(energy.argmin()) * hop + hop // 2
        yield i / SR, a[i:cut]
        i = cut
    yield i / SR, a[i:]

It's a crude energy check, not real voice activity detection. If someone talks nonstop for ten seconds the cut can still land mid-word. So far it hasn't been a problem in practice, and it's a dozen lines of NumPy.

A nice side effect: each piece is a natural progress tick, so the editor can show a real percentage instead of a spinner.

Problem 2: tokens aren't words

Parakeet returns sub-word tokens with start times. A token that begins with a space starts a new word; the rest get glued onto the previous one. Each piece's timestamps are offset by where that piece starts in the full audio.

Parakeet gives start times but not end times. For captions, a word's end is simply the next word's start, capped at one second so a word before a long pause doesn't stay lit forever. That approximation is invisible on screen.

Problem 3: one box, many users

Transcription and rendering are CPU-heavy, and the server is shared. The worker allows two jobs at once, and long videos are limited to one of those slots, so a 20-minute upload can't block someone's 30-second clip. Everything else waits in a queue with a visible "queued" state.

What I'd do differently

  • Start with the benchmark. I assumed Whisper would win. On this hardware, for this audio, it didn't.
  • Measure memory, not just speed. The OOM only showed up on longer files.
  • Keep the simple heuristic until it fails. The quiet-window split is ugly and has worked fine.

If you want to see the result, the web editor at autocaptions.cc is free for videos up to 5 minutes. Next post: how the captions are rendered with ffmpeg and libass, including transparent overlays for Premiere Pro.

About the author

  • Full Stack Developer and Cloud Engineer with 4+ years of hands-on experience designing, developing, and implementing applications and solutions using a range of technologies, platforms, and programming languages.

No comments yet. Be the first to comment.