AI & prompting

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

To use Whisper locally, install it with pip install -U openai-whisper, install ffmpeg, and run whisper recording.mp3 --model turbo; it writes a transcript and subtitle files next to where you ran it. Everything runs offline after the first model download, and a GPU with about 6 GB of VRAM handles the turbo model, while the tiny and base models work on an ordinary CPU.

What you need

  • Python with pip. The README states compatibility with Python 3.8 to 3.11; our test install below ran on Python 3.12 without problems.
  • ffmpeg, which Whisper uses to read audio and video files.
  • PyTorch, installed automatically as a dependency. For an NVIDIA GPU you need a CUDA build of PyTorch; depending on your platform, the default pip install may give you a CPU-only build.
  • Disk space for the model you choose, from about 75 MB (tiny) to several GB (large).

Step 1: Install ffmpeg

These are the commands from the Whisper README:

# Ubuntu or Debian
sudo apt update && sudo apt install ffmpeg

# Arch Linux
sudo pacman -S ffmpeg

# macOS (Homebrew)
brew install ffmpeg

# Windows (Chocolatey or Scoop)
choco install ffmpeg
scoop install ffmpeg

Check it with ffmpeg -version. If that command isn't found, Whisper won't be able to open your files either.

Step 2: Install Whisper in a virtual environment

python -m venv whisper-env
# Windows
whisper-env\Scripts\activate
# macOS / Linux
source whisper-env/bin/activate

pip install -U openai-whisper

A virtual environment keeps PyTorch, which is large, out of your system Python; see Python virtual environments if you haven't used one. For an NVIDIA GPU, install the CUDA build of PyTorch first, using the command that the selector on pytorch.org generates for your OS and CUDA version, then install Whisper. For a CPU-only machine, the CPU build is a smaller download:

pip install --index-url https://download.pytorch.org/whl/cpu torch
pip install -U openai-whisper

Check that PyTorch can see your GPU with python -c "import torch; print(torch.cuda.is_available())". False means Whisper will run on the CPU.

Step 3: Pick a Whisper model

From the Whisper README (speeds are relative to large, on an A100 GPU):

ModelParametersEnglish-only versionVRAM neededRelative speed
tiny39 Mtiny.en~1 GB~10x
base74 Mbase.en~1 GB~7x
small244 Msmall.en~2 GB~4x
medium769 Mmedium.en~5 GB~2x
large1550 Mnone~10 GB1x
turbo809 Mnone~6 GB~8x

How to choose:

  • GPU with 6 GB or more: start with turbo, which the README describes as an optimized version of large-v3 with faster transcription.
  • Need translation to English: use medium or large. The README says turbo "is not trained for translation tasks" and returns the original language even with --task translate.
  • English audio on a small GPU or CPU: base.en or small.en. The README notes that the .en models tend to do better on English, especially tiny.en and base.en.
  • CPU only, quick drafts: tiny or base.

Step 4: Transcribe from the command line

whisper interview.mp3 --model turbo

Useful options (all from whisper --help):

  • --language English: skip language detection. Faster, and avoids the occasional wrong guess on a short or noisy clip.
  • --task translate: transcribe and translate into English (not with turbo).
  • --output_format srt: choose one of txt, vtt, srt, tsv, json or all. Without it, Whisper writes every format.
  • --output_dir transcripts: where to put the files.
  • --device cpu or --device cuda: force a device.
  • --fp16 False: on CPU, this silences the harmless UserWarning: FP16 is not supported on CPU; using FP32 instead.
  • --model_dir: where models are stored. The default is ~/.cache/whisper.

You can pass several files at once: whisper a.flac b.mp3 c.wav --model turbo. Video files work too, because ffmpeg extracts the audio.

Use Whisper from Python

import whisper

model = whisper.load_model("turbo")
result = model.transcribe("audio.mp3")
print(result["text"])

for seg in result["segments"]:
    print(f"[{seg['start']:.2f} -> {seg['end']:.2f}] {seg['text']}")

result["segments"] gives start and end times in seconds for each phrase, which is what you need to build your own subtitle or search index.

A real test run, with timings

To show what the output looks like, we generated an 8.9-second English speech clip with the Windows built-in speech synthesizer and transcribed it with openai-whisper 20250625 and the CPU build of PyTorch 2.14, on a laptop with an Intel Core i7-13700H and no GPU. The output, for the tiny model:

[0.00 -> 3.48] Whisper runs entirely on your own computer.
[3.48 -> 8.12] This sentence was generated for a test, and the meeting starts at 930 tomorrow.

And for base:

[0.00 -> 3.36] Whisper runs entirely on your own computer.
[3.36 -> 8.56] This sentence was generated for a test, and the meeting starts at 9.30 tomorrow.

Both models got every word right. The spoken words were "nine thirty", and the difference shows the usual small-model weakness: formatting of numbers, names and punctuation, not the words themselves. Transcription took 1.7 seconds with tiny and 2.5 seconds with base, after the models were loaded. The first run of each model also downloaded it: tiny.pt is 75.6 MB and base.pt 145 MB on disk. One clean synthetic clip says nothing about accuracy on real recordings with accents, crosstalk or background noise, so test on a sample of your own audio before choosing a model.

Common errors

FileNotFoundError: [WinError 2] The system cannot find the file specified

On Windows, this is what the command line prints when ffmpeg is missing. It looks like your audio file wasn't found, but it is ffmpeg that couldn't be started. The full line in our test was:

Skipping sample.wav due to FileNotFoundError: [WinError 2] The system cannot find the file specified

Install ffmpeg, open a new terminal so the updated PATH is loaded, and check ffmpeg -version.

torch.cuda.is_available() is False, or it's slow despite a GPU

You have the CPU build of PyTorch. Uninstall torch in the virtual environment and install the CUDA build using the command from pytorch.org. Whisper's --device option defaults to cuda when PyTorch reports a usable GPU, and to cpu otherwise.

CUDA out of memory

The model doesn't fit your VRAM. Drop one size in the table (large to turbo, turbo to small). Close other programs using the GPU, including games and image generators. The same parameters-to-memory reasoning is covered for language models in how much VRAM you need to run an LLM locally.

Faster alternative for CPUs and Macs: whisper.cpp

whisper.cpp is a C/C++ port of the same models with no Python or PyTorch. It runs on the CPU (with AVX on x86 and NEON on ARM), with Metal and Core ML on Apple Silicon, and with CUDA or Vulkan on GPUs. Its README lists memory use of about 273 MB for tiny, 388 MB for base, 852 MB for small, 2.1 GB for medium and 3.9 GB for large. The catch is input format: its whisper-cli example reads only 16-bit WAV, so convert first:

ffmpeg -i input.mp3 -ar 16000 -ac 1 -c:a pcm_s16le output.wav
./build/bin/whisper-cli -m models/ggml-base.en.bin -f output.wav

If you're already running local language models, the setup will look familiar; see how to run an LLM locally with Ollama.

Frequently asked questions

Is Whisper free to use locally?
Yes. The openai-whisper package and its model weights are downloadable and run on your own computer, with no API key and no per-minute charge. The only costs are your hardware and electricity. OpenAI's hosted transcription API is a separate, paid service.
Does local Whisper send my audio anywhere?
No. After the one-time model download, transcription runs entirely on your machine, so the audio never leaves it. That is the main reason to run it locally for interviews, medical or legal recordings and other private material.
Can Whisper run without a GPU?
Yes. It runs on the CPU, just more slowly, and you should pass --fp16 False (or fp16=False in Python) to avoid a warning. The tiny and base models are practical on a modern CPU; the larger models are much slower without a GPU. whisper.cpp is a faster option for CPU-only machines.
Which Whisper model is the most accurate?
The large model is the most accurate of the official set and needs about 10 GB of VRAM. turbo is an optimized version of large-v3 with faster transcription that needs about 6 GB, and it is not trained for translation. For English-only audio, the README says the .en models tend to perform better, especially tiny.en and base.en.

Sources