はじめに
faster-whisperのv1.1.0で最新モデル「large-v3-turbo」がリリースされました。
早速faster-whisperをアップデートして推論するぞ!と思いましたがCUDA周りでエラーが出てしまったためその対処の備忘録です。
CUDA:11.6
GPU:NVIDIA GeForce RTX 3090
ドライバー: 560.94
faster-whisperのアップデート
以下のようにfaster-whisperを1.1.0
にアップデートしました。
pip install faster-whisper -U
依存するライブラリのav
、ctranslate2
も更新されたようです。
Successfully installed av-14.0.1 ctranslate2-4.5.0 faster-whisper-1.1.0
large-v3-turboが動かない、、
推論のコードを以下に変えて実行したところcuDNNプラグインが無いと怒られました。
Could not locate cudnn_ops64_9.dll. Please make sure it is in your library path!
Invalid handle. Cannot load symbol cudnnCreateTensorDescriptor
【解決策】ctranslate2のダウングレード
faster-whisper-1.1.0の要件にctranslate2<5,>=4.0
があり、これが悪さをしていました。
同時に更新されたctranslate2はCUDA12向けということで、CUDA11に対応するバージョンを強制的にインストールします。
pip install ctranslate2==3.24.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
faster-whisper 1.1.0 requires ctranslate2<5,>=4.0, but you have ctranslate2 3.24.0 which is incompatible.
インストールが終わったとき依存関係のエラーは出ましたが、CUDA 11.6で無事に推論できました!
large-v3より明らかに早く、しかも文字起こし精度が高いです!
ぜひお試しください!