I tried to install whisper, but I am getting the error messages (below) with Command Line and even with Google Colaboratory (Google Drive). I tried mp4, mp3 and wav files, but I always get error messages.
Here is what I get with Google Colaboratory:
!whisper "teste.mp3" --model medium
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/whisper/audio.py", line 58, in load_audio
out = run(cmd, capture_output=True, check=True).stdout
File "/usr/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ffmpeg', '-nostdin', '-threads', '0', '-i', 'teste.mp3', '-f', 's16le', '-ac', '1', '-acodec', 'pcm_s16le', '-ar', '16000', '-']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/whisper/transcribe.py", line 597, in cli
result = transcribe(model, audio_path, temperature=temperature, **args)
File "/usr/local/lib/python3.10/dist-packages/whisper/transcribe.py", line 133, in transcribe
mel = log_mel_spectrogram(audio, model.dims.n_mels, padding=N_SAMPLES)
File "/usr/local/lib/python3.10/dist-packages/whisper/audio.py", line 140, in log_mel_spectrogram
audio = load_audio(audio)
File "/usr/local/lib/python3.10/dist-packages/whisper/audio.py", line 60, in load_audio
raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from e
RuntimeError: Failed to load audio: ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
teste.mp3: No such file or directory
Skipping teste.mp3 due to RuntimeError: Failed to load audio: ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
teste.mp3: No such file or directory
Here is what I get with Command Prompt: (“cmd” in the same folder as the file)
whisper "teste.mp3"
Traceback (most recent call last):
File "C:UsersWalesonAppDataLocalProgramsPythonPython310librunpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:UsersWalesonAppDataLocalProgramsPythonPython310librunpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:UsersWalesonAppDataLocalProgramsPythonPython310Scriptswhisper.exe__main__.py", line 4, in <module>
File "C:UsersWalesonAppDataLocalProgramsPythonPython310libsite-packageswhisper__init__.py", line 8, in <module>
import torch
File "C:UsersWalesonAppDataLocalProgramsPythonPython310libsite-packagestorch__init__.py", line 148, in <module>
raise err
OSError: [WinError 126] The specified module could not be found. Error loading "C:UsersWalesonAppDataLocalProgramsPythonPython310libsite-packagestorchlibfbgemm.dll" or one of its dependencies.
I followed YouTube tutorials and read some posts here, but nothing works. (I don’t understand much)
Waleson Lopes is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.