kadirnar / whisper-plus

WhisperPlus: Faster, Smarter, and More Capable 🚀
Apache License 2.0
1.7k stars 137 forks source link

ModuleNotFoundError: No module named "Whisper" #86

Closed jhmejia closed 5 months ago

jhmejia commented 5 months ago

Hi, I might be doing something incorrectly, but I am having trouble installing this.

I started by using a venv then activating it, then installing everything as shown on the instructions:

python -m venv .venv
source .venv/bin/activate
pip install whisperplus git+https://github.com/huggingface/transformers
pip install flash-attn --no-build-isolation

All of this worked fine. But then when I tried to import anything, I got ModuleNotFoundError: No module named 'whisper'

Full traceback:

(.venv) classgpu@host:~/whisperplustesting$ python test22.py 
Traceback (most recent call last):
  File "/home/classgpu/whisperplustesting/test22.py", line 1, in <module>
    from whisperplus import SpeechToTextPipeline, download_and_convert_to_mp3
  File "/home/classgpu/whisperplustesting/.venv/lib/python3.10/site-packages/whisperplus/__init__.py", line 1, in <module>
    from whisper.pipelines.whisper_autocaption import WhisperAutoCaptionPipeline
ModuleNotFoundError: No module named 'whisper'

I then tried installing whisper directly though pip install openai-whisper but then I got the error ModuleNotFoundError: No module named 'whisper.pipelines'

jhmejia commented 5 months ago

After I commented out this line everything seemed to work fine, save for the speechbrain dependency

(.. Even though the speechbrain dependency was updated to 0.5.16 in requirements.txt, it still seemingly installed speechbrain 1.0.0 until I specifically told it to uninstall and reinstall as 0.5.16. Maybe that's just me!)

stevevaius2015 commented 5 months ago

I have the same issue now. I installed the whisper from openai (via pip) and now have issue with whisper.pipeline model missing error.

kadirnar commented 5 months ago

@jhmejia , @stevevaius2015 Thank you for the error report. My fault. I will fix it immediately and release a new version.

kadirnar commented 5 months ago

I published the new version. Install this version. pip install whisperplus==0.3.3

https://github.com/kadirnar/whisper-plus/commit/ff921127f4119a0970677cff70fd41cf570d6c81