Browser Whisper: why the tiny model looped, what "small" fixed, and a 4x faster render with WebCodecs
Disclosure: I build ClipTool (https://freeclipmaker.com), a free clip maker that runs entirely in the browser. These are measurements from building it, on one Windows laptop (8 cores, 16 GB, Intel integrated graphics), so treat the numbers as a data point, not a benchmark. Two things hurt most when

you run a video pipeline in the browser: how long it takes, and how wrong the captions are. Here is what I measured while fixing both. My first default was whisper-tiny through transformers.js: small download, fast, "close enough for clear English". On a real screen recording with a bit of room noise it produced this kind of output for a stretch of a few seconds: And I think that's the most important thing.
And I think that's the most important thing. And I think that's the most important thing... That is the classic decoder loop. It also dropped or garbled ordinary words, and word timestamps made the loop look like real captions burned into a video.
Two cheap guards helped but did not fix the cause: a post-filter that collapses a repeated phrase of 3 or more words, and no_repeat_ngram_size: 6 when generating. The real fix was a bigger model. I had a narrated walkthrough with a script, so I could score models on the first four minutes. Word error rate against the script (lower is better): Model Words wrong whisper base 31% whisper base.en 28% whisper small.en 22% whisper large-v3-turbo (native, int8, CPU) 18% Caveats: the script is not exactly what was said, and numbers spelled as digits count as errors, so the absolute values are inflated.
The ranking is what matters. Reading the transcripts, large-v3-turbo caught names and jargon that base mangled completely ("septic found" became "sitting down" in base). In the browser, whisper-small.en on WebGPU ran 75 seconds of audio in about 78 seconds, the same speed as base, for visibly better text. The catch: the first load took about 2.5 minutes even from a warm cache (shader compilation), and the model is a few hundred MB on the first visit.
Large-v3-turbo was far too slow for this integrated GPU. Things that did not help in transformers.js: Beam search (num_beams: 4): identical output to greedy when word timestamps are on. Prompting Whisper with a vocabulary: not supported there. What did help: a user-supplied "names and terms" list that snaps close-sounding words to the right spelling (matching similar-sounding letters like b/p), plus a plain caption editor.
ffmpeg.wasm (single thread) did the whole render at roughly 0.3x real time. A 35 second clip took 3 to 4 minutes. The change that mattered: Decode the source with WebCodecs (I used the mediabunny library to get frames as canvases). Draw each output frame on an OffscreenCanvas: reframe, punch-in zoom, word-by-word captions, logo.
Encode with the browser's hardware H.264 encoder (VideoEncoder). Let ffmpeg.wasm do only the audio (cuts, filler removal, music ducking, loudness) and copy the finished picture with -c:v copy. On the same laptop, a clip's picture takes roughly its own length (22 to 34 seconds for a 35 second clip), and five clips went from about 15 to 20 minutes to about 4.5. If WebCodecs or the encoder is unavailable, it falls back to the all-ffmpeg path.
For long videos, speech recognition at roughly real time is the bottleneck: an hour of video is about an hour of transcription. If the goal is a handful of clips, you do not need every minute. Scoring windows by loudness and liveliness first, then transcribing only the best stretches (plus an evenly spread sample so quiet but meaningful parts get a chance), cut transcription work by about 40% even for 30 clips and much more for 5 to 10. Do not default to the tiny model for anything that ends up on screen.
It loops. Measure against a real script instead of trusting leaderboards. Put the heavy per-frame work on canvas and WebCodecs, and keep ffmpeg.wasm for what it is good at. Skip work you do not need.
If you want to see the result, ClipTool is at https://freeclipmaker.com. I am happy to answer questions about any of this in the comments.
Key Takeaways
- •Here is what I measured while fixing both.
- •This story was reported by Dev.to, covering developments in the dev space.
- •AI advancements continue to reshape industries — read the full article on Dev.to for complete coverage.
📖 Continue reading the full article:
Read Full Article on Dev.to →


