Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I keep getting this error. #24

Open
swankwc opened this issue Oct 22, 2022 · 5 comments
Open

I keep getting this error. #24

swankwc opened this issue Oct 22, 2022 · 5 comments

Comments

@swankwc
Copy link

swankwc commented Oct 22, 2022

line 8, in
sys.exit(main())
File "/Users/wesley/miniconda3/lib/python3.9/site-packages/yt_whisper/cli.py", line 49, in main
result = model.transcribe(audio_path, **args)
File "/Users/wesley/miniconda3/lib/python3.9/site-packages/whisper/transcribe.py", line 84, in transcribe
mel = log_mel_spectrogram(audio)
File "/Users/wesley/miniconda3/lib/python3.9/site-packages/whisper/audio.py", line 111, in log_mel_spectrogram
audio = load_audio(audio)
File "/Users/wesley/miniconda3/lib/python3.9/site-packages/whisper/audio.py", line 46, in load_audio
except ffmpeg.Error as e:
AttributeError: module 'ffmpeg' has no attribute 'Error'

@HardikJain02
Copy link

pip install --ffmpeg-python

@swankwc
Copy link
Author

swankwc commented Jan 8, 2023

pip install --ffmpeg-python
Done but now I'm getting this.
(base) Wesleys-MacBook-Air:whisper-ui wesley$ pip install --ffmpeg-python

Usage:
pip install [options] [package-index-options] ...
pip install [options] -r [package-index-options] ...
pip install [options] [-e] ...
pip install [options] [-e] ...
pip install [options] <archive url/path> ...

no such option: --ffmpeg-python

@iwasthesword
Copy link

The correct command should be pip install ffmpeg-python

@swankwc
Copy link
Author

swankwc commented Jan 9, 2023

The correct command should be pip install ffmpeg-python

After running that it appears to install correctly, however.
Any idea how to fix the following?

Running setup.py install for future ... done
Successfully installed ffmpeg-python-0.2.0 future-0.18.2
(ytwhisper) Wesleys-MacBook-Air:whisper wesley$ pip install git+https://github.com/m1guelpf/yt-whisper.git
Collecting git+https://github.com/m1guelpf/yt-whisper.git
Cloning https://github.com/m1guelpf/yt-whisper.git to /private/var/folders/_c/wd0r0w017lx_84wcssfhc4_80000gn/T/pip-req-build-vsqkbx64
Running command git clone --filter=blob:none --quiet https://github.com/m1guelpf/yt-whisper.git /private/var/folders/_c/wd0r0w017lx_84wcssfhc4_80000gn/T/pip-req-build-vsqkbx64
Resolved https://github.com/m1guelpf/yt-whisper.git to commit 0190e7e
Preparing metadata (setup.py) ... done
Collecting whisper@ git+https://github.com/openai/whisper.git@main#egg=whisper
Cloning https://github.com/openai/whisper.git (to revision main) to /private/var/folders/_c/wd0r0w017lx_84wcssfhc4_80000gn/T/pip-install-zb88p2el/whisper_e9368e70f18245589ccfec7d6780b2b7
Running command git clone --filter=blob:none --quiet https://github.com/openai/whisper.git /private/var/folders/_c/wd0r0w017lx_84wcssfhc4_80000gn/T/pip-install-zb88p2el/whisper_e9368e70f18245589ccfec7d6780b2b7
Resolved https://github.com/openai/whisper.git to commit 28769fcfe50755a817ab922a7bc83483159600a9
Preparing metadata (setup.py) ... done
Collecting yt-dlp
Using cached yt_dlp-2023.1.6-py2.py3-none-any.whl (2.8 MB)
Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from whisper@ git+https://github.com/openai/whisper.git@main#egg=whisper->yt-whisper==1.0) (1.23.5)
INFO: pip is looking at multiple versions of yt-whisper to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement torch (from whisper) (from versions: none)
ERROR: No matching distribution found for torch
(ytwhisper) Wesleys-MacBook-Air:whisper wesley$ yt_whisper "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
Downloaded video "Rick Astley - Never Gonna Give You Up (Official Music Video)". Generating subtitles...
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/whisper/audio.py", line 42, in load_audio
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 "/opt/homebrew/bin/yt_whisper", line 8, in
sys.exit(main())
File "/opt/homebrew/lib/python3.10/site-packages/yt_whisper/cli.py", line 49, in main
result = model.transcribe(audio_path, **args)
File "/opt/homebrew/lib/python3.10/site-packages/whisper/transcribe.py", line 84, in transcribe
mel = log_mel_spectrogram(audio)
File "/opt/homebrew/lib/python3.10/site-packages/whisper/audio.py", line 111, in log_mel_spectrogram
audio = load_audio(audio)
File "/opt/homebrew/lib/python3.10/site-packages/whisper/audio.py", line 46, in load_audio
except ffmpeg.Error as e:
AttributeError: module 'ffmpeg' has no attribute 'Error'

@HardikJain02
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants