EarScribe
Investigation7 min read

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.

ReportedWhat it saysWhat it is actually measuring
dev.to writeupOnly the extracted audio lives in memory, about 230 MB per hour of float32 PCMThe 16 kHz array only — the decoder's own buffer is not counted
transformers.js issue #1319Chrome on Android allocated 1,026 MB for WebAssembly memory, then failed to create a 23 MB bufferOne device's hard allocation ceiling — not the run's working set
openplaud notesPeak somewhere between 200 MB and 1.5 GBA range across devices, models and file lengths, with no split by phase
All three are honest. None of them separates the decode buffer from the model weights, and that separation is the whole story.

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.

1382 MB

An 8 GB machine has · 8,192 MB

  • Source file60 MB4%
  • 16 kHz mono PCM230 MB14%
  • 48 kHz stereo buffer1,382 MB83%
One hour of audio, split by phase. The decoder's working buffer is six times the array the model reads, and the whole thing is a fifth of an 8 GB laptop.— lib/audio.ts:21-24

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.

length16 kHz PCM48 kHz bufferEstimated peakOn a 4 GB deviceOn an 8 GB device
10 min37 MB220 MB0.31 GBsafesafe
30 min110 MB659 MB0.81 GBsafesafe
60 min220 MB1318 MB1.56 GBcautionsafe
120 min439 MB2637 MB3.06 GBhighcaution
Peak before transcription begins, assuming a 60 MB source file. The last two columns are the verdict the app shows in its own warning: high above 55% of RAM, caution above 30%.— computed from lib/audio.ts

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.

EarScribe on a phone showing interview-q3.mp3 at 269 KB and 34 seconds, Whisper Base selected with auto-detect language, and a Download 77 MB and transcribe button
The same pre-run block on a phone: 269 KB, 34 seconds, base at 77 MB on the CPU path, and the one-time download stated before anything is decoded.— product UI, mobile, before a run

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.

format100 MB500 MB1 GB
WAV 44.1 kHz stereo 16-bit10 min50 min101 min
WAV 16 kHz mono 16-bit55 min273 min559 min
MP3 320 kbps44 min218 min447 min
MP3 128 kbps109 min546 min1118 min
MP3 64 kbps (voice)218 min1092 min2237 min
How much audio fits in a given file size. A 1 GB WAV holds 99 minutes; a 1 GB voice MP3 holds 34 hours.— computed from the byte rates shown in each row

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

99 min44.1 kHz stereo, 16-bit — the size is honest about the audio

1 GB of voice MP3

34 hours64 kbps mono — the same megabyte, twenty times the recording
Two files a tool would treat identically because both are under the limit. The byte count says nothing about how long the job is.— computed from the byte rates above

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.

  1. 1Probe first

    Read container duration before allocating anything; 15 s timeout.

  2. 2Decode a segment

    Five minutes at 16 kHz mono, then release the native buffer.

  3. 3Transcribe

    30 s windows, 5 s stride, inside the worker.

  4. 4Recycle the worker

    Terminate and recreate, so peak memory is one segment, not the file.

Peak memory becomes a function of segment length instead of total length.— workers/whisper.worker.ts

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.

EarScribe pre-run summary showing a 34-second audio file, the selected Whisper Base model, auto-detected language and a Download 291 MB and transcribe button
Everything the memory decision needs is already on screen: the file, its duration, the model and the one-time download.— product UI, before a run
SituationWhat happensWhat you should do
Peak under 30% of RAMRuns normallyNothing
Peak between 30% and 55%Warning shown, run still offeredClose other tabs; keep this tab active
Peak above 55%Strong warning, run still offeredSplit the file, or export a 16 kHz mono copy
File above 1 GiBRejected before decodingCompress it; a voice MP3 is 60× smaller than WAV
Decoder rejects the sourceNo model is downloadedRe-export as MP3, WAV or M4A
The app never blocks a run on memory. It warns, because a wrong estimate should not stop a user who knows their machine.

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.