OpenAI Whisper: How to Use It Locally or via API
Dzianis Kukareka, Founder · Updated

OpenAI Whisper is a free, open-source speech recognition model you can run in two ways: locally on your own computer (install Python and ffmpeg, then pip install -U openai-whisper and run whisper audio.mp3), or through OpenAI's paid API, which costs $0.006 per minute as of November 2026. Running it locally costs nothing but your hardware time; the API is quicker to set up but caps files at 25 MB. Neither labels who is speaking out of the box, which is the main reason people end up adding other tools.
This tutorial walks through both routes, explains which model to pick, and says plainly when a ready-made service saves you more time than it costs.
What is OpenAI Whisper?
Whisper is a speech-to-text model that OpenAI released as open source, with code and model weights under the MIT license on its GitHub repository. It transcribes speech in many languages (the tokenizer lists 100 language codes), detects the language automatically, and can translate speech from other languages into English. It runs on audio files, not as a live dictation tool, and it turns them into plain text, subtitles (SRT, VTT) or JSON with timestamps.
| Whisper locally | OpenAI API | |
|---|---|---|
| Cost | Free (your hardware and electricity) | $0.006 per minute for Whisper, as of November 2026 |
| Setup | Python, ffmpeg, a few GB of model files | API key and a few lines of code |
| File size | No limit beyond your memory | 25 MB per file |
| Privacy | Audio never leaves your computer | Audio is sent to OpenAI |
| Speed | Depends on your GPU; slow on CPU | Fast, no hardware needed |
| Speaker labels | No | Only with a separate diarization model |
How to install Whisper locally
The official package needs Python and ffmpeg. The README says it was tested with Python 3.9.9 and is expected to work with Python 3.8 to 3.11, so if you have a newer Python, create a virtual environment with a supported version.
Step 1: Install ffmpeg
Whisper uses ffmpeg to read audio and video files. Use the command for your system:
| System | Command |
|---|---|
| macOS (Homebrew) | brew install ffmpeg |
| Windows (Chocolatey) | choco install ffmpeg |
| Windows (Scoop) | scoop install ffmpeg |
| Ubuntu or Debian | sudo apt update && sudo apt install ffmpeg |
| Arch Linux | sudo pacman -S ffmpeg |
Step 2: Install Whisper with pip
In a terminal, inside your virtual environment, run:
pip install -U openai-whisper
If the install fails while building tiktoken, your platform has no prebuilt wheel and you need Rust installed. If you see No module named 'setuptools_rust', run pip install setuptools-rust and try again.
Step 3: Transcribe your first file
Run Whisper on an audio or video file:
whisper interview.mp3 --model turbo --language English
The first run downloads the model, which takes a while. Whisper then prints the transcript as it goes and saves output files to the current folder. By default it writes every format: TXT, VTT, SRT, TSV and JSON. To get only subtitles, add --output_format srt. Leave out --language and Whisper detects the language from the first 30 seconds, which usually works but can guess wrong on short or mixed-language clips.
Which Whisper model should you use?
Whisper comes in several sizes. Bigger models are more accurate and slower. These figures come from the official README; speeds are relative to the large model on an A100 GPU with English speech, so your machine will differ.
| Model | Parameters | VRAM needed | Relative speed | English-only version |
|---|---|---|---|---|
| tiny | 39 M | ~1 GB | ~10x | tiny.en |
| base | 74 M | ~1 GB | ~7x | base.en |
| small | 244 M | ~2 GB | ~4x | small.en |
| medium | 769 M | ~5 GB | ~2x | medium.en |
| large | 1,550 M | ~10 GB | 1x | none |
| turbo | 809 M | ~6 GB | ~8x | none |
Start with turbo. It is the default, an optimized version of large-v3 with minimal accuracy loss, and much faster.
Use medium or large to translate. The README notes that turbo is not trained for translation, so for
--task translatepick a multilingual model likemediumorlarge.Use a .en model for English on a weak machine. The English-only versions of the small models tend to do better on English than their multilingual twins.
How to use Whisper in Python
If you want to process files in a script, the Python interface is three lines:
import whispermodel = whisper.load_model("turbo")result = model.transcribe("interview.mp3")print(result["text"])
The result dictionary also contains segments, each with a start time, end time and text, which is what you need to build your own subtitle file or search index. Add word_timestamps=True to get timing per word (the CLI flag is marked experimental).
How to run Whisper on a Mac
The official package runs on a Mac, but by default it uses the CPU unless a CUDA GPU is available, and Macs don't have CUDA. On a long recording that can be slow. Two practical options:
Use a smaller model such as
smallorbase.enfor quick drafts.Use whisper.cpp, a C/C++ port that its README describes as optimized for Apple Silicon, running on the GPU via Metal. Its example command line only reads 16-bit WAV, so convert first with
ffmpeg -i input.mp3 -ar 16000 -ac 1 -c:a pcm_s16le output.wav.
How to use the OpenAI Whisper API
If you don't want to install anything, send the file to OpenAI's API. Create an API key in your OpenAI account, install the SDK with pip install openai, set the key as the OPENAI_API_KEY environment variable, and run:
from openai import OpenAIclient = OpenAI()srt = client.audio.transcriptions.create(model="whisper-1", file=open("interview.mp3", "rb"), response_format="srt")print(srt)
Things to know before you build on it, from OpenAI's speech-to-text guide:
25 MB per file. Supported types are MP3, MP4, MPEG, MPGA, M4A, WAV and WebM. For longer recordings, compress the audio (our free audio compressor runs in your browser) or split the file.
whisper-1 is being retired. OpenAI lists whisper-1 as deprecated, with shutdown on February 26, 2027, and recommends its newer gpt-transcribe model. Plan your code so the model name is easy to change.
Output formats depend on the model. The API reference lists JSON, text, SRT, VTT and verbose JSON; the gpt-4o transcribe models only return JSON.
Prompts help with names. A short prompt with spelling of names and jargon improves results; for whisper-1 the prompt is limited to 224 tokens.
OpenAI Whisper pricing
Running Whisper yourself is free. On the API, OpenAI's pricing page lists these estimated costs as of November 2026:
| API model | What it does | Estimated cost per minute |
|---|---|---|
| Whisper (whisper-1) | Transcription | $0.006 |
| gpt-transcribe | Transcription (recommended) | $0.0045 |
| gpt-4o-mini-transcribe | Transcription | $0.003 |
| gpt-4o-transcribe-diarize | Transcription with speaker labels | $0.006 |
At $0.006 a minute, an hour of audio on whisper-1 costs $0.36. The real cost of the API is usually the engineering time: splitting files, retrying failures, and merging results.
Whisper's limits: what it doesn't do
No speaker labels. Whisper gives you one stream of text. To know who said what, you need a separate diarization step, such as pyannote combined with Whisper, or the diarization model on the API. Our explainer on speaker diarization covers why it is a separate problem.
No editor. You get text files. Checking a transcript against the audio means building or finding a player that syncs the two.
Hardware matters. Large models on a laptop CPU can take longer than the recording itself.
Silence and music cause errors. Long pauses can produce repeated or made-up lines. Trim silence or check those spots.
Translation goes one way. Whisper translates into English only, and turbo doesn't translate at all.
When a transcription service is simpler than Whisper
Whisper is the right choice if you're a developer, you want audio to stay on your machine, or you have a GPU and a lot of files. It's a poor fit if you need a transcript of a two-hour interview this afternoon, with speakers labeled and a way to fix mistakes.
That's what services built on top of speech models are for. With BlaBlaScribe (our product) you upload a file up to 8 GB, and you get speaker labels, word-level timestamps and an editor, in 120+ languages, with accuracy up to 99.8% on clear audio. Exports are SRT, VTT, TXT and DOCX, and paid plans add summaries and subtitle translation into 50+ languages. The first 30 minutes are free, once, and plans start at $14 a month (pricing). Files are processed on servers in Germany and never used to train AI. For a fuller cost comparison, read Whisper vs paid transcription tools.
Frequently asked questions
Is OpenAI Whisper free?
Yes, the model and code are free and open source under the MIT license when you run them on your own computer. Using Whisper through OpenAI's API is paid, at $0.006 per minute as of November 2026.
Can Whisper identify different speakers?
No. Whisper outputs one stream of text without speaker labels. You need a separate diarization tool, OpenAI's diarization model on the API, or a transcription service that labels speakers.
What file size can the Whisper API handle?
The API accepts files up to 25 MB in MP3, MP4, MPEG, MPGA, M4A, WAV or WebM. Larger recordings need to be compressed or split into parts first.
Which Whisper model is the most accurate?
The large model is the most accurate, and turbo is an optimized large-v3 that is much faster with minimal accuracy loss. For translation into English, use medium or large, because turbo isn't trained for translation.
Can I run Whisper without a GPU?
Yes, Whisper runs on a CPU, but large models are slow that way. Use a smaller model, or on Apple Silicon Macs try whisper.cpp, which runs on the Mac's GPU via Metal.
Turn your recordings into text you can use
Upload audio or video, paste a YouTube link, or record in the browser — and get a speaker-labeled transcript in minutes, in 120+ languages.
Try BlaBlaScribe for freeNo credit card required · Stored in the EU · Never used for AI training





