Install and Use OpanAI Whisper

These commands work for Ubuntu. Should be simple to change for other Linux distros.

Install Nvidia and CUDA drivers

sudo apt install nvidia-driver-530 nvidia-cuda-toolkit

Reboot so the system uses the driver.

Install pip and ffmpeg

sudo apt install python3-pip
sudo apt install ffmpeg

Now we can install whisper with

pip install -U openai-whisper

Run Whisper

After it is installed, it should be able to run it like

whisper audio.mp3 --model medium

Change out medium to the model you would like to use. It will then download the model and then work get to work on transcribing it. The .en models i.e. medium.en, seem to perform better then the other ones. If you are using English that is.

If you receive a “Command ‘whisper’ not found” error, you may not have ~/.local/bin in your user PATH. Either add ~/.local/bin to your PATH, or run whisper with the full path

~/.local/bin/whisper audio.mp3 --model medium

OpenAI Whisper GitHub link.

2 thoughts on “Install and Use OpanAI Whisper

  1. Hi, thank you for this guide!

    I’m using Linux mint, and I followed the steps above, but I get this error:

    ~/.local/bin/whisper “file.mp3” –model medium.en
    Traceback (most recent call last):
    File “/home/j/.local/bin/whisper”, line 5, in
    from whisper.transcribe import cli
    File “/home/j/.local/lib/python3.10/site-packages/whisper/”, line 13, in
    from .model import ModelDimensions, Whisper
    File “/home/j/.local/lib/python3.10/site-packages/whisper/”, line 13, in
    from .transcribe import transcribe as transcribe_function
    File “/home/j/.local/lib/python3.10/site-packages/whisper/”, line 20, in
    from .timing import add_word_timestamps
    File “/home/j/.local/lib/python3.10/site-packages/whisper/”, line 7, in
    import numba
    File “/home/j/.local/lib/python3.10/site-packages/numba/”, line 55, in
    File “/home/j/.local/lib/python3.10/site-packages/numba/”, line 40, in _ensure_critical_deps
    raise ImportError(msg)
    ImportError: Numba needs NumPy 1.22 or greater. Got NumPy 1.21.

    Can you please help?

Leave a Reply

Your email address will not be published. Required fields are marked *