m-bain / whisperX

WhisperX: Automatic Speech Recognition with Word-level Timestamps (& Diarization)
BSD 2-Clause "Simplified" License
12.66k stars 1.34k forks source link

WhisperX in Google colab Unable to load any of {libcudnn_ops.so.9.1.0, libcudnn_ops.so.9.1, libcudnn_ops.so.9, libcudnn_ops.so} #901

Closed sijitang closed 1 month ago

sijitang commented 1 month ago
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Tue_Aug_15_22:02:13_PDT_2023
Cuda compilation tools, release 12.2, V12.2.140
Build cuda_12.2.r12.2/compiler.33191640_0

!pip uninstall -y torch torchvision torchaudio
!pip install torch==2.0.0+cu118 torchvision==0.15.1+cu118 torchaudio==2.0.1+cu118 -f https://download.pytorch.org/whl/torch_stable.html
!pip install git+https://github.com/m-bain/whisperx.git

whisperx './htdemucs/oU6L2XdvTn0/vocals.wav' --model large-v3 --device cuda --batch_size 16 --chunk_size 30 --vad_onset 0.100 --vad_offset 0.200 --suppress_numerals --language de --compute_type float32 --output_dir .   --align_model WAV2VEC2_ASR_LARGE_LV60K_960H

Unable to load any of {libcudnn_ops.so.9.1.0, libcudnn_ops.so.9.1, libcudnn_ops.so.9, libcudnn_ops.so} Invalid handle. Cannot load symbol cudnnCreateTensorDescriptor

federicotorrielli commented 1 month ago

Here the culprit is ctranslate2. The library was just updated to version 4.5.0, which uses cuDNN 9.2. Downgrading ctranslate to version 4.4.0 is enough to fix the problem, but the WhisperX repository is largely unmaintained at the moment, so I suggest swithing to a maintained fork (https://github.com/federicotorrielli/BetterWhisperX)

TLDR:

%%capture
!pip install git+https://github.com/Hasan-Naseer/whisperX.git@release/latest-faster-whisper-version
!pip install ctranslate2==4.4.0

OR

%%capture
!pip install git+https://github.com/federicotorrielli/BetterWhisperX
HangFang6 commented 1 month ago

这里的罪魁祸首是 ctranslate2。该库刚刚更新到版本 4.5.0,它使用 cuDNN 9.2。 将 ctranslate 降级到版本 4.4.0 足以解决问题,但 WhisperX 存储库目前基本无人维护,因此我建议切换到维护的分支(https://github.com/federicotorrielli/BetterWhisperX

总结

%%capture
!pip install git+https://github.com/Hasan-Naseer/whisperX.git@release/latest-faster-whisper-version
!pip install ctranslate2==4.4.0

You're absolutely right! Running pip install ctranslate2==4.4.0 worked perfectly and solved the issue that had been bothering me all afternoon. Thank you so much!

sijitang commented 1 month ago

Here the culprit is ctranslate2. The library was just updated to version 4.5.0, which uses cuDNN 9.2. Downgrading ctranslate to version 4.4.0 is enough to fix the problem, but the WhisperX repository is largely unmaintained at the moment, so I suggest swithing to a maintained fork (https://github.com/federicotorrielli/BetterWhisperX)

TLDR:

%%capture
!pip install git+https://github.com/Hasan-Naseer/whisperX.git@release/latest-faster-whisper-version
!pip install ctranslate2==4.4.0

Thank you so much!

kevdawg94 commented 1 month ago

Thank you for this fix @federicotorrielli - heads up when I tried executet my whisperx flow after a pip install with your github link (!pip install git+https://github.com/federicotorrielli/BetterWhisperX) I got an error regarding a missing hotwords argument. It looks like this is a new feature that you've added support for but I don't see any instructions on the implementation in your fork. Hope this helps!

devvidhani commented 1 month ago

wow, just my luck. struggled with this issue for last 2 days, and was doing down the path chasing cudnn_cnn legacy libraries and dependencies.. Thx to @federicotorrielli and @Hasan-Naseer

Dream-gamer commented 1 month ago

Thank you for this fix @federicotorrielli - heads up when I tried executet my whisperx flow after a pip install with your github link (!pip install git+https://github.com/federicotorrielli/BetterWhisperX) I got an error regarding a missing hotwords argument. It looks like this is a new feature that you've added support for but I don't see any instructions on the implementation in your fork. Hope this helps!

I too am getting this error about missing hotwords argument. Please resolve this, that would be of great help.

federicotorrielli commented 1 month ago

Thank you for this fix @federicotorrielli - heads up when I tried executet my whisperx flow after a pip install with your github link (!pip install git+federicotorrielli/BetterWhisperX) I got an error regarding a missing hotwords argument. It looks like this is a new feature that you've added support for but I don't see any instructions on the implementation in your fork. Hope this helps!

I too am getting this error about missing hotwords argument. Please resolve this, that would be of great help.

It's not an error, it's a warning. The new version of faster-whisper uses hotwords but I decided not to implement the feature right now. It still works as intended, do not worry.

kevdawg94 commented 1 month ago

Thank you for this fix @federicotorrielli - heads up when I tried executet my whisperx flow after a pip install with your github link (!pip install git+federicotorrielli/BetterWhisperX) I got an error regarding a missing hotwords argument. It looks like this is a new feature that you've added support for but I don't see any instructions on the implementation in your fork. Hope this helps!

I too am getting this error about missing hotwords argument. Please resolve this, that would be of great help.

It's not an error, it's a warning. The new version of faster-whisper uses hotwords but I decided not to implement the feature right now. It still works as intended, do not worry.

When I ran my pipeline it gave an error. Not being familiar with hotwords I didn't know how to debug and reverted to the original whisperX github that I had been utilizing with the suggested temporary workaround.

federicotorrielli commented 1 month ago

Thank you for this fix @federicotorrielli - heads up when I tried executet my whisperx flow after a pip install with your github link (!pip install git+federicotorrielli/BetterWhisperX) I got an error regarding a missing hotwords argument. It looks like this is a new feature that you've added support for but I don't see any instructions on the implementation in your fork. Hope this helps!

I too am getting this error about missing hotwords argument. Please resolve this, that would be of great help.

It's not an error, it's a warning. The new version of faster-whisper uses hotwords but I decided not to implement the feature right now. It still works as intended, do not worry.

When I ran my pipeline it gave an error. Not being familiar with hotwords I didn't know how to debug and reverted to the original whisperX github that I had been utilizing with the suggested temporary workaround.

Unfortunately I cannot reproduce the error without further explanations...

remic33 commented 2 weeks ago

Same trouble here on new implementation. We should maxout faster-whisper version

mmatferneu commented 1 week ago

Thank you for this fix @federicotorrielli - heads up when I tried executet my whisperx flow after a pip install with your github link (!pip install git+federicotorrielli/BetterWhisperX) I got an error regarding a missing hotwords argument. It looks like this is a new feature that you've added support for but I don't see any instructions on the implementation in your fork. Hope this helps!

I too am getting this error about missing hotwords argument. Please resolve this, that would be of great help.

It's not an error, it's a warning. The new version of faster-whisper uses hotwords but I decided not to implement the feature right now. It still works as intended, do not worry.

When I ran my pipeline it gave an error. Not being familiar with hotwords I didn't know how to debug and reverted to the original whisperX github that I had been utilizing with the suggested temporary workaround.

Unfortunately I cannot reproduce the error without further explanations...

Here is a simple way to do it: run the code on a Colab instance. Watch the instance crash and burn. Really! Not an error, but a crash that results in a runtime reset.