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

latest faster-whisper support added #875

Merged

Conversation

Hasan-Naseer
Copy link
Contributor

@Hasan-Naseer Hasan-Naseer commented Sep 5, 2024

  • requirements.txt updated
  • latest distil models are now available
  • asr.py updated with new parameters for faster-whisper 1.0.3
  • support for hotwords added

@RichardQin1
Copy link

RichardQin1 commented Sep 7, 2024

hellow ,Now I want to use the hotwords feature in the latest version of FastWhisper. Which branch do you recommend using. Additionally, I attempted to use the fastwhisper model separately and employed Whisperx Dialization Pipeline may encounter errors due to model conflicts.

def load_asr_model():
    model = faster_whisper.WhisperModel("large-v3", device=global_var.MODEL_DEVICE, compute_type=global_var.MODEL_COMPUTE_TYPE)
    return model

def load_speaker_model():
    diarize_model = whisperx.DiarizationPipeline(use_auth_token='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',
                                                 device=global_var.MODEL_DEVICE)
    return diarize_model

simultaneous loading print error:

Could not load library libcudnn_cnn_infer.so.8. Error: /home/phoenix/anaconda3/envs/dataProductionTasks/bin/../lib/libcudnn_cnn_infer.so.8: undefined symbol: _ZN11nvrtcHelper4loadEb, version libcudnn_ops_infer.so.8

···
conda install pytorch==2.0.0 torchaudio==2.0.0 pytorch-cuda=11.8 -c pytorch -c nvidia

···
Can you please teach me
thank!!!

@Hasan-Naseer
Copy link
Contributor Author

Hasan-Naseer commented Sep 8, 2024

hellow ,Now I want to use the hotwords feature in the latest version of FastWhisper. Which branch do you recommend using. Additionally, I attempted to use the fastwhisper model separately and employed Whisperx Dialization Pipeline may encounter errors due to model conflicts.

def load_asr_model():
    model = faster_whisper.WhisperModel("large-v3", device=global_var.MODEL_DEVICE, compute_type=global_var.MODEL_COMPUTE_TYPE)
    return model

def load_speaker_model():
    diarize_model = whisperx.DiarizationPipeline(use_auth_token='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',
                                                 device=global_var.MODEL_DEVICE)
    return diarize_model

simultaneous loading print error:

Could not load library libcudnn_cnn_infer.so.8. Error: /home/phoenix/anaconda3/envs/dataProductionTasks/bin/../lib/libcudnn_cnn_infer.so.8: undefined symbol: _ZN11nvrtcHelper4loadEb, version libcudnn_ops_infer.so.8

··· conda install pytorch==2.0.0 torchaudio==2.0.0 pytorch-cuda=11.8 -c pytorch -c nvidia

··· Can you please teach me thank!!!

Hey. It depends on whether you're cloning the repo and building it to run or just installing using pip.

For cloning the repo:
open the working directory of your repo
run

git pull origin release/latest-faster-whisper-version

This should give you the required branch. Now when you install the dependencies from requirements.txt you should have everything up to date.

Alternatively, and this is the method I recommend, use it through pip.

Install the fork https://github.com/Hasan-Naseer/whisperX.git. The main branch has the commits for latest faster-whisper (hotwords) support and has prnt_segments and prnt_duration parameters for better verbose and debugging.

Make sure you're in the directory environment with whisperX installed
run

pip uninstall faster-whisper whisperx
pip install git+https://github.com/Hasan-Naseer/whisperX.git

This should give you the latest commit with all the features.

PS. Your error seems to be related to a dependency problem in the "libcudnn" library. It is seemingly unrelated to faster-whisper or whisperx. Please look into a solution for that.

@zckrs
Copy link

zckrs commented Nov 14, 2024

@m-bain any news about merge this ?

Copy link
Collaborator

@Barabazs Barabazs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you revert all the changes that are not needed for your feature please?
For example:

  • changed gitignore
  • code formatting

This will make reviewing the PR easier and keep the commit history clean.

@Barabazs Barabazs merged commit 7fdbd21 into m-bain:main Dec 31, 2024
@Barabazs
Copy link
Collaborator

Thank you for your contribution!

yuki-opus pushed a commit to opus-pro/whisperX that referenced this pull request Jan 2, 2025
yuki-opus added a commit to opus-pro/whisperX that referenced this pull request Jan 6, 2025
* local vad model

* move model to assets

* Remove typo in error message

* Fix link in README.md

* Added Romanian phoneme-based ASR model (m-bain#791)

Co-authored-by: Barabazs <[email protected]>

* feat: add new align models (m-bain#922)

Co-authored-by: Barabazs <[email protected]>

* feat: update Norwegian models (m-bain#687)

Updated Norwegian Bokmål and Norwegian Nynorsk models

Co-authored-by: Barabazs <[email protected]>

* fix: Force ctranslate to version 4.4.0

Force ctranslate to version 4.4.0 due libcudnn_ops_infer.so.8:
SYSTRAN/faster-whisper#729

Co-authored-by: Icaro Bombonato <[email protected]>

* Update MANIFEST.in to include necessary files

* chore: bump version

* feat: update faster-whisper to 1.0.2 (m-bain#814)

* Update faster-whisper to 1.0.2 to enable model distil-large-v3

* feat: add hotwords option to default_asr_options

---------

Co-authored-by: Barabazs <[email protected]>

* feat: add support for faster-whisper 1.0.3 (m-bain#875)




---------

Co-authored-by: Barabazs <[email protected]>

* feat: update versions for pyannote:3.3.2 and faster-whisper:1.1.0 (m-bain#936)

* chore: bump faster-whisper to 1.1.0

* chore: bump pyannote to 3.3.2

* feat: add multilingual option in load_model function

---------

Co-authored-by: Barabazs <[email protected]>

* feat: add verbose output (m-bain#759)




---------

Co-authored-by: Abhishek Sharma <[email protected]>
Co-authored-by: Barabazs <[email protected]>

* feat: add local_files_only option on whisperx.load_model for offline mode (m-bain#867)

Adds the parameter local_files_only (default False for consistency) to whisperx.load_model so that the user can avoid downloading the file and return the path to the local cached file if it exists.

---------

Co-authored-by: Barabazs <[email protected]>

* feat: use model_dir as cache_dir for wav2vec2 (m-bain#681)

* feat: add Python compatibility testing workflow

feat: restrict Python versions to 3.9 - 3.12

* feat: add build and release workflow

* chore: clean up MANIFEST.in by removing unnecessary asset inclusions

* chore: update gitignore

* fix: update README image source and enhance setup.py for long description

* docs: update installation instructions in README

* chore: update license in setup.py

* fix: add UTF-8 encoding when reading README.md

* chore: update ctranslate2 version to restrict <4.5.0

* chore: bump whisperX to 3.3.0

* fix: update import statement for conjunctions module

* refactor: simplify imports for better type inference

* refactor: add type hints

* feat: include speaker information in  WriteTXT when diarizing

* refactor: replace NamedTuple with TranscriptionOptions in FasterWhisperPipeline

---------

Co-authored-by: Max Bain <[email protected]>
Co-authored-by: Max Bain <[email protected]>
Co-authored-by: Alex Zamoshchin <[email protected]>
Co-authored-by: Jim O’Regan <[email protected]>
Co-authored-by: Ruhollah Majdoddin <[email protected]>
Co-authored-by: Barabazs <[email protected]>
Co-authored-by: Ismael Ruiz Ranz <[email protected]>
Co-authored-by: pere <[email protected]>
Co-authored-by: Icaro Bombonato <[email protected]>
Co-authored-by: Frost Ming <[email protected]>
Co-authored-by: moritzbrantner <[email protected]>
Co-authored-by: Hasan Naseer <[email protected]>
Co-authored-by: Abhishek Sharma <[email protected]>
Co-authored-by: Abhishek Sharma <[email protected]>
Co-authored-by: Roque Giordano <[email protected]>
Co-authored-by: bnitsan <[email protected]>
Co-authored-by: Philippe Anel <[email protected]>
croquies pushed a commit to fika-dev/x-custom that referenced this pull request Jan 20, 2025
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

Successfully merging this pull request may close these issues.

4 participants