How to transcribe long audio in a browser without running out of memory
If you have seen “Transcription failed. Your device may be out of memory — try a smaller model”, the advice is half right. Memory is the limit. The model is usually not what exhausted it.
Why does a long audio file crash the browser tab?
Reported peaks for the same hour of audio run from 230 MB to 1.5 GB, and the three write-ups are measuring three different things.
| Reported | What it says | What it is actually measuring |
|---|---|---|
| dev.to writeup | Only the extracted audio lives in memory, about 230 MB per hour of float32 PCM | The 16 kHz array only — the decoder's own buffer is not counted |
| transformers.js issue #1319 | Chrome on Android allocated 1,026 MB for WebAssembly memory, then failed to create a 23 MB buffer | One device's hard allocation ceiling — not the run's working set |
| openplaud notes | Peak somewhere between 200 MB and 1.5 GB | A range across devices, models and file lengths, with no split by phase |
People have measured this. Their answers disagree by a factor of five, which is usually a sign that they measured different things and used the same word for it — and that is exactly what happened here. The 230 MB figure and the 1.5 GB figure are not in conflict. One is a run that decoded into a 16 kHz buffer; the other decoded at the file's native rate, or let the browser hold the whole file plus its decoded form. Same file, same model, five times the memory — and the difference has nothing to do with Whisper.
How much memory does an hour of audio need?
Our own estimator, in lib/audio.ts, budgets three things before a single token is decoded: the original file bytes, the 48 kHz stereo buffer the browser allocates while decoding, and the 16 kHz mono array Whisper actually consumes. The middle term is the one nobody budgets for, and it is the largest.
An 8 GB machine has · 8,192 MB
- Source file60 MB4%
- 16 kHz mono PCM230 MB14%
- 48 kHz stereo buffer1,382 MB83%
That is the whole mechanism. 3,600 seconds × 48,000 samples × 2 channels × 4 bytes is 1,382 MB, and it exists before transcription starts. A 16 kHz mono array of the same audio is 230 MB. Five-sixths of the memory a one-hour job needs is spent turning a compressed file into samples, and it is released — or should be — the moment the array exists.
| length | 16 kHz PCM | 48 kHz buffer | Estimated peak | On a 4 GB device | On an 8 GB device |
|---|---|---|---|---|---|
| 10 min | 37 MB | 220 MB | 0.31 GB | safe | safe |
| 30 min | 110 MB | 659 MB | 0.81 GB | safe | safe |
| 60 min | 220 MB | 1318 MB | 1.56 GB | caution | safe |
| 120 min | 439 MB | 2637 MB | 3.06 GB | high | caution |
Read the 8 GB column: a two-hour file lands at 3.21 GB, which is 40% of the machine — the caution band, not the danger band. On a 4 GB laptop the same file is 80% and the app will tell you so before it starts. That is why the same recording can be fine on one machine and fatal on another with the same model: the model is a fixed cost, the decoder is proportional to length, and the two multiply differently across devices.

How long an audio file can a browser transcribe?
99 minutes of WAV or 34 hours of voice MP3 — same 1 GiB, and that gap is the other half of the confusion. People compare files by megabytes, and the WAV is the one that will hurt you: it was already uncompressed, so the same byte count buys a fraction of the recording.
| format | 100 MB | 500 MB | 1 GB |
|---|---|---|---|
| WAV 44.1 kHz stereo 16-bit | 10 min | 50 min | 101 min |
| WAV 16 kHz mono 16-bit | 55 min | 273 min | 559 min |
| MP3 320 kbps | 44 min | 218 min | 447 min |
| MP3 128 kbps | 109 min | 546 min | 1118 min |
| MP3 64 kbps (voice) | 218 min | 1092 min | 2237 min |
This is the table that should replace “up to 1 GB” in every tool's marketing. The site does accept files up to 1 GiB, and the honest reading of that limit is: it depends entirely on what is inside. A 1 GiB voice memo is a 34-hour job that will not fit in any phone; a 1 GiB WAV is 99 minutes that a laptop can handle.
1 GB of WAV
1 GB of voice MP3
How to transcribe long audio in five-minute segments
5 minutes per segment is the number that turns peak memory from a function of the file length into a function of the segment length. You cannot make the decoder cheaper without changing the audio, but you can stop holding the whole file at once: we hand each segment to the model and terminate the worker between them, so the browser actually reclaims the heap — browsers are conservative about releasing WebAssembly memory inside a live worker.
- 1Probe first
Read container duration before allocating anything; 15 s timeout.
- 2Decode a segment
Five minutes at 16 kHz mono, then release the native buffer.
- 3Transcribe
30 s windows, 5 s stride, inside the worker.
- 4Recycle the worker
Terminate and recreate, so peak memory is one segment, not the file.
How to fix a file that will not transcribe
A two-hour file estimates at 3.21 GB, which is 40% of an 8 GB machine — that is where the warning fires, and everything else the decision needs is on screen: the file, its duration, the model and the download.

| Situation | What happens | What you should do |
|---|---|---|
| Peak under 30% of RAM | Runs normally | Nothing |
| Peak between 30% and 55% | Warning shown, run still offered | Close other tabs; keep this tab active |
| Peak above 55% | Strong warning, run still offered | Split the file, or export a 16 kHz mono copy |
| File above 1 GiB | Rejected before decoding | Compress it; a voice MP3 is 60× smaller than WAV |
| Decoder rejects the source | No model is downloaded | Re-export as MP3, WAV or M4A |
Two things we do not do, and they are deliberate. We do not downsample the source before decoding — the browser's decoder needs the native stream, and re-encoding first would add a quality loss nobody asked for. And we do not stream the audio from disk, because the browser's decode path wants a buffer, not a stream; pretending otherwise would move the crash somewhere less diagnosable.
What this memory estimate gets wrong
249 MB on the CPU path and 968 MB on the GPU path are missing from it: the estimate counts the file and the two buffers, not the weights, because the estimate is a model rather than a measurement. It also does not count whatever else the tab is holding. On iOS, Safari will kill the tab before any of these numbers are reached, so the practical ceiling there is lower than the arithmetic suggests. We also have no data on how often this actually happens in the wild: the analytics events record a failure and a device class, not a memory reading, and publishing a distribution from that would be guessing.
What the arithmetic does give you is a way to predict the failure before you spend twenty minutes on it. That is a smaller claim than the blogs make, and it is one you can check against your own file in about ten seconds — see the Whisper page for the same numbers applied to model choice.
Written by Rocnubee, developer of earscribe. The formula above is the one the app runs, reproduced rather than re-derived; the thresholds are ours, chosen against 4 GB and 8 GB machines rather than from a published standard.