How to Run Whisper Locally: Free Offline Speech-to-Text

Why transcribe locally

Cloud transcription is convenient, but it costs money per minute and uploads your audio — interviews, meetings, lectures — to someone else's servers. OpenAI's Whisper, released open-source in 2022, is one of the best speech-recognition models ever made, and it runs entirely on your own machine. The code and weights are MIT-licensed, it understands around 98 languages, and once you have the weights downloaded, you can transcribe with the network off. This guide gets you from zero to your first local transcript in about 15 minutes.

Whisper converts raw audio into a log-mel spectrogram, then a transformer encoder-decoder predicts text. Source: NewsCarpenter (original diagram)

Step 1: Pick your model size

Whisper ships in six sizes. The sizes, parameter counts, and VRAM figures below are from OpenAI's own repository README, with speed measured relative to the large model:

SizeParametersVRAM neededRelative speedUse it for…
tiny39M~1 GB~10xReal-time notes on weak hardware
base74M~1 GB~7xQuick drafts, CPU laptops
small244M~2 GB~4xThe balanced default for CPU
medium769M~5 GB~2xGood accuracy on modest GPUs
turbo809M~6 GB~8xNear-large accuracy, far faster
large-v31550M~10 GB1xBest quality, serious hardware

Two details matter. turbo (large-v3-turbo) is a pruned large-v3 with 4 decoder layers instead of 32 — nearly the accuracy at roughly 8x the speed, making it the sweet spot for GPUs. One caveat from OpenAI: turbo was not trained for translation, so ask it to translate and it will hand you the original language. And large-v3 remains the accuracy reference: it processes 128 mel-frequency bins (earlier models used 80) and reports 10–20% fewer errors than large-v2.

Step 2: Install your runtime

There are three solid routes. Choose one.

Route A: faster-whisper (recommended for most)

faster-whisper reimplements Whisper on the CTranslate2 inference engine. The project reports up to 4x faster transcription than the original at the same accuracy, with 8-bit quantization available on both CPU and GPU — and unlike the original, it does not even require FFmpeg on your system (it decodes audio through a bundled Python library). Python 3.9 or newer is the only real requirement.

pip install faster-whisper

Save this as transcribe.py:

from faster_whisper import WhisperModel

# Use "small" on CPU: model = WhisperModel("small", device="cpu", compute_type="int8")
model = WhisperModel("turbo", device="cuda", compute_type="float16")

segments, info = model.transcribe("meeting.mp3", beam_size=5)
print("Detected language '%s'" % info.language)

with open("transcript.txt", "w") as f:
    for segment in segments:
        line = "[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text)
        print(line)
        f.write(line + "\n")

Two options worth knowing: word_timestamps=True gives you per-word timing for karaoke-style captions, and vad_filter=True runs a voice-activity detector first, which cuts hallucinated text during long silences.

Route B: whisper.cpp (best for CPU and Apple Silicon)

If you have no GPU, or you are on a Mac, whisper.cpp is the native C++ port and runs beautifully on CPUs. Build it with CMake:

git clone https://github.com/ggerganov/whisper.cpp
cd whisper.cpp
cmake -B build
cmake --build build -j

# Download a model (do this once):
sh ./models/download-ggml-model.sh small

# Transcribe:
./build/bin/whisper-cli -m models/ggml-small.bin -f sample.wav

On a CPU, expect the small or base model — large models on CPU are patient work. Note that whisper.cpp accepts WAV natively; convert other formats first (e.g. ffmpeg -i audio.mp3 sample.wav).

Route C: openai-whisper (the original, simplest CLI)

OpenAI's reference implementation remains the easiest one-liner if you just want it to work. It does require FFmpeg on your system (brew install ffmpeg on macOS, sudo apt install ffmpeg on Ubuntu):

pip install openai-whisper
whisper audio.mp3 --model base --language en

This writes audio.txt, audio.srt, and audio.vtt next to your file. Omit --language and Whisper auto-detects, though setting it explicitly is slightly more accurate and skips the detection pass.

Step 3: Subtitles and batch jobs

For video subtitles, timed formats are the point. faster-whisper's word-level timestamps plus an SRT writer turn a podcast into caption files, and whisper.cpp does it in one flag:

./build/bin/whisper-cli -m models/ggml-small.bin -f episode.wav -osrt

For a folder of recordings, loop over the files — keep a small model in memory and process them one at a time rather than loading the model per file. Transcribing a folder overnight with the base model costs you exactly nothing, which is the whole point.

Troubleshooting

  • faster-whisper fails to find the GPU. On Linux, GPU mode needs NVIDIA's cuBLAS and cuDNN libraries alongside CUDA 12. When in doubt, drop to device="cpu", compute_type="int8" — INT8 on CPU is surprisingly capable and fully offline.
  • Garbled text in silent sections. Add vad_filter=True to skip non-speech, and pass --language explicitly. Whisper sometimes "hears" speech in music and room tone.
  • Out of memory. Step down one model size, or use turbo instead of large-v3: similar quality, roughly half the VRAM.
  • Wrong language detected. Set the language explicitly. Auto-detection on very short clips (under a few seconds) is unreliable.

Closing

You now have a private transcription studio that costs nothing per minute and uploads nothing anywhere. Pair the transcripts with a local RAG pipeline to ask questions about your recordings, or read our Ollama setup guide to run a local LLM alongside for summarization. Everything in this stack — transcription, chat, retrieval — can live on your own hardware.


 

Comments

Popular posts from this blog

Open-Source AI Weekly: Bonsai, GigaChat 4 Lead

Claude Claims Proof of Riemann Hypothesis After 167 Years

How to Build an AI Agent with LangGraph in 30 Minutes