Menu

Running Whisper in the browser: 5 decisions behind a no-upload, no-cap transcriber
📰

Running Whisper in the browser: 5 decisions behind a no-upload, no-cap transcriber

DEV Community: machinelearning·Vipul Singh·about 9 hours ago
#IspndCna
Long article (457 words) — no AI summary yet.
Reading 0:00
15s threshold

I built a transcriber that runs OpenAI's Whisper entirely in the browser: no upload, no signup, no file cap. The AI part is mostly solved by the model. What took the time were the decisions around it. Here are the ones that mattered, including the tradeoffs.

1. Decode with the browser, not a bundled codec library

I didn't ship ffmpeg or any codec library. Audio and video are decoded with the browser's own media engine, so support follows whatever Chrome, Edge, Safari or Firefox can already play: MP3, WAV, M4A/AAC, OGG/Opus, and the audio track of MP4, MOV and WEBM.

The upside is a much lighter page and nothing extra to download. The downside is honest: Safari and Firefox can occasionally fail on an unusual codec inside an MP4/MOV/WEBM. So the tool shows a clear error instead of failing silently, and the fix is usually re-exporting as MP3 or WAV.

2. Don't load the model code until the user asks

The Whisper/Transformers.js code is lazy-loaded, so it only loads when someone actually starts a transcription.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.