saharmor/whisper-playground

Backend error : AttributeError: module 'whisper' has no attribute 'load_model'

OK-Cactus opened this issue · 2 comments

AttributeError: module 'whisper' has no attribute 'load_model'
127.0.0.1 - - [15/Dec/2022 13:17:56] "POST /transcribe HTTP/1.1" 500 -
[2022-12-15 13:18:06,805] ERROR in app: Exception on /transcribe [POST]
Traceback (most recent call last):
  File "/Users/omkar.kadam/Desktop/whisper-playground/backend/venv/lib/python3.9/site-packages/flask/app.py", line 2525, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/omkar.kadam/Desktop/whisper-playground/backend/venv/lib/python3.9/site-packages/flask/app.py", line 1822, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/omkar.kadam/Desktop/whisper-playground/backend/venv/lib/python3.9/site-packages/flask_cors/extension.py", line 165, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/Users/omkar.kadam/Desktop/whisper-playground/backend/venv/lib/python3.9/site-packages/flask/app.py", line 1820, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/omkar.kadam/Desktop/whisper-playground/backend/venv/lib/python3.9/site-packages/flask/app.py", line 1796, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/Users/omkar.kadam/Desktop/whisper-playground/backend/app.py", line 21, in transcribe
    audio_model = whisper.load_model(model)
AttributeError: module 'whisper' has no attribute 'load_model'
127.0.0.1 - - [15/Dec/2022 13:18:06] "POST /transcribe HTTP/1.1" 500 - 

I'm getting this error when I follow the Readme steps, i have tried making changes in the App.js and package.json stumbling on another issue claiming it to be due to CORS,

But the backend seems broken, any help is appreciated, I probably have missed some package/model dependency

Thanks in advance!

Try this and report back openai/whisper#251

@OK-Cactus closing for now. Feel free to reopen if the issue persists.