#whisper help

1 messages · Page 1 of 1 (latest)

thin osprey
#

when i use whisper through command prompt it works flawlessly, however when i try to run it through a python script it says:

'whisper' has no attribute 'load_model'

i tried to debug and used: print(dir(whisper))
which gave me:

['AudioTranscriber', 'QApplication', 'QColor', 'QMainWindow', 'QPalette', 'QPushButton', 'QTextCursor', 'QTextEdit', 'QTimer', 'QVBoxLayout', 'QWidget', 'Qt', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'np', 'queue', 'sd', 'sf', 'sys', 'tempfile', 'threading', 'whisper']

and now im stumpted, ive updated everything, reinstalled everything, restarted everything 10 times over and this still happens.

dire trellisBOT
#

Hi @thin osprey. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the information you've provided, it seems like you might be encountering an issue where your Python environment is not correctly configured to use the whisper package from OpenAI. This could be due to a variety of reasons, such as using a different Python environment in your IDE compared to your command line, or having a different package named whisper installed that is conflicting with the OpenAI whisper package.

One way to confirm this is by checking the file path of the whisper module in your Python script. You can do this by adding the following lines to your script:

import whisper
print(whisper.__file__)

If the printed path ends with whisper.py, you're using the wrong package. In this case, you should uninstall the current whisper package and reinstall the correct one from OpenAI. You can do this by running the following commands:

pip uninstall whisper
pip install git+<https://github.com/openai/whisper.git> 

This information is based on a similar issue discussed in the OpenAI Whisper GitHub Discussions (https://github.com/openai/whisper/discussions/143). If you continue to encounter issues, I would recommend checking out the OpenAI Whisper GitHub page (https://github.com/openai/whisper) for more information and potential solutions.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: