using Whisper on aws (Amazon Linux 2) #1148
Unanswered
omermyspitch
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I am getting the same error. Haven't found a fix. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I tried to use whisper on AWS ( Deep Learning AMI GPU PyTorch 1.13.1 (Amazon Linux 2))
the requirements.txt file :
numpy tqdm transformers>=4.19.0 ffmpeg-python==0.2.0 pyaudio SpeechRecognition pydub git+https://github.com/openai/whisper.git --extra-index-url https://download.pytorch.org/whl/cu113 torch flask flask_cors
I get the error :
ffmpeg.input(file, threads=0)
AttributeError: module 'ffmpeg' has no attribute 'input'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ec2-user/my-spitch-whisper/wenv/lib/python3.9/site-packages/flask/app.py", line 2528, in wsgi_app
response = self.full_dispatch_request()
File "/home/ec2-user/my-spitch-whisper/wenv/lib/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/ec2-user/my-spitch-whisper/wenv/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 "/home/ec2-user/my-spitch-whisper/wenv/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/home/ec2-user/my-spitch-whisper/wenv/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/ec2-user/my-spitch-whisper/app.py", line 40, in transcribe
result = audio_model.transcribe(save_path, language='english')
File "/home/ec2-user/my-spitch-whisper/wenv/lib/python3.9/site-packages/whisper/transcribe.py", line 121, in transcribe
mel = log_mel_spectrogram(audio, padding=N_SAMPLES)
File "/home/ec2-user/my-spitch-whisper/wenv/lib/python3.9/site-packages/whisper/audio.py", line 130, in log_mel_spectrogram
audio = load_audio(audio)
File "/home/ec2-user/my-spitch-whisper/wenv/lib/python3.9/site-packages/whisper/audio.py", line 50, in load_audio
except ffmpeg.Error as e:
AttributeError: module 'ffmpeg' has no attribute 'Error'
any idea? I tired to uninstall ffmpeg and ffmpeg-python and to pip install with no luck
Beta Was this translation helpful? Give feedback.
All reactions