Guides: Ready-to-go ML Environments

OpenAI Whisper

In this guide, we show you how easy it is to jump in and get Whisper running on a Brev environment.


Setting up your environment:

  1. Open up the Brev console and create a new environment
  2. Add https://github.com/openai/whisper.git as your Github repo
  3. Select a GPU. We recommend the g3s.xlarge for Whisper.
  4. Skip the rest of the steps and add a card at the bottom if you haven't already
  5. Hit create!

Opening your environment:

Check you have Brev installed:

brev --version

If not, you can install it with the command:

brew install brevdev/homebrew-brev/brev && brev login

Then open your environment:

brev open whisper

Give it a couple of minutes to load up...it takes about 4 minutes the first time you open an environment

Running Whisper:

You can confirm you have GPUs with:

nvidia-smi

Activate the base python environment:

source activate base

Install Whisper dependencies:

pip install git+https://github.com/openai/whisper.git 
sudo apt update && sudo apt install ffmpeg

Upload a wav audio recording to your environment (you can do this by dragging and dropping into VSCode) and run Whisper on your recording:

whisper recording.wav

You can also load and run the model in python scripts like this:

import whisper

model = whisper.load_model("base")
result = model.transcribe("recording.wav")
print(result["text"])

That's it! For full instructions on what you can do with Whisper - check out OpenAI's docs.

Previous
CLIP