kadirnar / whisper-plus

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

new Installation - many errors in Conda Python 3.8, 3.10 and 3.12 #82

Closed PiotrEsse closed 4 months ago

PiotrEsse commented 4 months ago

Hi, I am trying to install WhisperPlud but face many issues.

Traceback (most recent call last):
  File "/home/piotr/WhisperPlus/Tutorial/caption.py", line 1, in <module>
    from whisperplus import WhisperAutoCaptionPipeline
ImportError: cannot import name 'WhisperAutoCaptionPipeline' from 'whisperplus' (/home/piotr/anaconda3/envs/WhisperPlus310/lib/python3.10/site-packages/whisperplus/__init__.py)

OR

Traceback (most recent call last):
  File "/home/piotr/WhisperPlus/Tutorial/youtubetoaudio.py", line 20, in <module>
    bnb_4bit_compute_dtype=torch.bfloat16,
NameError: name 'torch' is not defined

I have new Installation - many errors in Conda Python 3.8, 3.10 and 3.12 Ive created new conda and follow instalation procedure:

pip install whisperplus git+https://github.com/huggingface/transformers

pip install flash-attn --no-build-isolation

Nvidia Cuda toolkit 12.4, nevest drivers.

kadirnar commented 4 months ago

I will fix this bug in the new version. You can use this code.

from whisperplus.pipelines.whisper_autocaption import WhisperAutoCaptionPipeline

caption = WhisperAutoCaptionPipeline(model_id="openai/whisper-large-v3")
caption(video_path="test.mp4", output_path="output.mp4", language="turkish")

Fixed NameError error. You should check out the readme page. Or you can add import torch at the top of the code.

kadirnar commented 4 months ago

I released a new version. You can use this.

pip install whisperplus==0.3.1
PiotrEsse commented 4 months ago

Thank You, there are new error message:

  File "/home/piotr/WhisperPlus/Tutorial/Diarization.py", line 1, in <module>
    from whisperplus import (
  File "/home/piotr/anaconda3/envs/WhisperPlus310/lib/python3.10/site-packages/whisperplus/__init__.py", line 1, in <module>
    from whisper.pipelines.whisper_autocaption import WhisperAutoCaptionPipeline
ModuleNotFoundError: No module named 'whisper'
PiotrEsse commented 4 months ago

Ive installed new Ubuntu24lts, install nvidia toolkit, driver, everything from the scratch, Python 3.8. The error persist:

File "/home/piotr/WhisperPlus/Tutorial/YoutubeToText.py", line 1, in <module> from whisperplus import SpeechToTextPipeline, download_and_convert_to_mp3 File "/home/piotr/anaconda3/envs/WhisperPlus38/lib/python3.8/site-packages/whisperplus/__init__.py", line 1, in <module> from whisper.pipelines.whisper_autocaption import WhisperAutoCaptionPipeline ModuleNotFoundError: No module named 'whisper'

kadirnar commented 4 months ago

https://github.com/kadirnar/whisper-plus/issues/86