OpenAI - Whisper: Help With Env Set-up

Question:
Can someone help figure out how to utilize OpenAI’s Whisper library on a Python REPL? Every time I try to follow the steps listed in the github repo here, I receive a lot of error messages in the console.

I am hoping someone could write the step-by-step commands one needs to enter to get the Whisper library to work in a python REPL.

import whisper

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

Hi @Dprevoznik thanks for your post and apologies for the delay in responding!

I’ve not looked at Whisper yet but wondered if you had read this article that describes step-by-step how to set it up? How to Run OpenAI’s Whisper Speech Recognition Model

If so let me know.

2 Likes

It does not work because the required function “load_model” does not appear in replit (at least not for me).

1 Like
  1. go to the .replit file and go to line 91 or guessImports = true
  2. change guessImports to false
  3. go to shell and enter pip uninstall whisper -y
  4. then enter pip install -U openai-whisper

this is because there is another package for databases called whisper which replit autoinstalls

4 Likes

Hi Ian. Just read that article and tried to follow along, but I am having a lot of trouble with the ffmpeg package. I keep receiving this error even though I have pip installed it.

FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'

Any thoughts? Does anyone have step by step guide for REPLIT specifically?

1 Like

on replit running pip install -U openai-whisper will auto install ffmpeg-python but other errors seem to occur no module named torch.C_ idk if it works on replit ngl?

1 Like

Hi @Dprevoznik I think you are maybe the first person to try using this package with Replit. There are no step-by-step guides that I can find at the moment.

1 Like

I also wasn’t able to install it on Replit.

I also wasn’t able to use Whisper because of this exact same error message @IanAtCSTeach

Was there any new resolutions?

Hi @tichx1 no I don’t think so.

1 Like