Skip to content

Guide · Open source

How to use Whisper: install, transcribe audio and translate

Updated · written with AI from the project's own documentation and checked against our catalogue data

Whisper is an open-source speech recognition model from OpenAI that turns spoken audio into written text. It can also translate non-English speech into English and identify the language being spoken. This guide shows how to install it, transcribe a file from the command line or Python, and choose a model that fits your computer.

Whisperopenai/whisper · ★ 112k · MIT

Quick start

  1. 1Check prerequisites. Confirm you have Python 3.8 to 3.11 and install ffmpeg for your operating system.
  2. 2Install Whisper. Run pip install -U openai-whisper to get the latest release.
  3. 3Transcribe a file. Run whisper with your audio file name to transcribe it using the default turbo model.
  4. 4Set the language. Add --language with the spoken language when the audio is not English.
  5. 5Translate if needed. Use a multilingual model such as medium with --task translate to get English output.
  6. 6Use Python for more control. Import whisper, load a model and call transcribe on your file if you are building into a project.

What do you need before installing Whisper?

Whisper is a Python package. The README says the codebase is expected to work with Python 3.8 to 3.11 and recent PyTorch versions. You also need the command-line tool ffmpeg installed on your system.

You may need Rust as well, but only if tiktoken does not provide a pre-built wheel for your platform. The README says that if pip install fails, you should install Rust.

  • Python 3.8 to 3.11
  • ffmpeg, available from most package managers
  • Rust, only if tiktoken has no pre-built wheel for your platform
  • Enough video memory (VRAM) for the model you choose, which the README lists per model

Install Whisper and ffmpeg

Install the latest release of Whisper with pip. Then install ffmpeg using your system's package manager. The README gives commands for Ubuntu or Debian, Arch Linux, macOS with Homebrew, and Windows with Chocolatey or Scoop.

If you want the latest commit from the repository instead of the release, the README lists a separate git install command.

pip install -U openai-whisper # on Ubuntu or Debian sudo apt update && sudo apt install ffmpeg # on MacOS using Homebrew brew install ffmpeg

Transcribe audio from the command line

The simplest way to use Whisper is the whisper command. This example transcribes several files at once using the turbo model, which is the default. The README notes that turbo works well for English.

For non-English speech, specify the language with --language. Run whisper --help to see all available options.

  • Pass one or more audio files, such as .flac, .mp3 or .wav
  • Use --model to pick a model size
  • Use --language when the speech is not English
whisper audio.flac audio.mp3 audio.wav --model turbo whisper japanese.wav --language Japanese

Translate non-English speech into English

To translate, use one of the multilingual models: tiny, base, small, medium or large. The README states that the turbo model is not trained for translation. If you use --task translate with turbo, it returns the original language instead.

The README recommends medium or large for the best translation results.

  • Do not use turbo for translation
  • Use medium or large for the best results, according to the README
whisper japanese.wav --model medium --language Japanese --task translate

Transcribe audio in Python

You can also use Whisper inside a Python project. Load a model with whisper.load_model, then call transcribe on a file. The method reads the whole file and processes it in a sliding 30-second window.

For lower-level control, the README shows whisper.detect_language() and whisper.decode(), which let you detect the language and decode the audio yourself.

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

Choose the right model size

Whisper has six model sizes. Four come in English-only versions with the .en suffix. Smaller models need less memory and run faster, while larger models are usually more accurate. The README's relative speeds were measured on an A100 and will vary with language, speaking speed and hardware.

The README says .en models tend to perform better, especially tiny.en and base.en. For English-only work, the smaller .en models are a good fit. Required video memory is roughly 1 GB for tiny and base, 2 GB for small, 5 GB for medium, 6 GB for turbo and 10 GB for large.

  • tiny (39M parameters, about 1 GB VRAM, roughly 10x relative speed)
  • base (74M, about 1 GB, roughly 7x)
  • small (244M, about 2 GB, roughly 4x)
  • medium (769M, about 5 GB, roughly 2x)
  • turbo (809M, about 6 GB, roughly 8x), an optimized version of large-v3 with minimal accuracy loss
  • large (1550M, about 10 GB, 1x)

What people use it for

  • Transcribing interview recordings on your own computer
  • Producing text from lectures or meetings saved as audio files
  • Adding audio transcription to a Python project
  • Translating non-English recordings into English with a multilingual model
  • Transcribing English-only audio with a smaller .en model

Frequently asked questions

Is Whisper free to use?

Whisper's code and model weights are released under the MIT License, according to the README. The license file is linked from the repository. Check the LICENSE file for the full terms.

What do I need to run Whisper?

You need Python 3.8 to 3.11, the ffmpeg command-line tool, and enough video memory for your chosen model. Rust may also be needed if tiktoken has no pre-built wheel for your platform.

How do I install Whisper?

Run pip install -U openai-whisper to install the latest release. Install ffmpeg separately using your system's package manager.

Can Whisper translate other languages into English?

Yes. Use a multilingual model with the --task translate option. The README says the turbo model is not trained for translation, so use medium or large for the best results.

Which Whisper model should I use?

Use turbo for general English transcription by default. For English-only work on modest hardware, the .en models such as tiny.en or base.en are options. For translation, use medium or large.

Does Whisper have a graphical app?

The README describes command-line and Python usage only. It does not mention a point-and-click app, so you will need to use the terminal or write Python code.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Whisper suits developers who want to add audio transcription to Python projects, and people who need to transcribe recordings privately on their own machine. It is less suitable if you need a point-and-click app or have a computer without enough video memory for the larger models.

Install options & downloads