今天测试faster-whisper-large-v3
pip install faster-whisper以后运行脚本,发生异常:
Traceback (most recent call last): File "/test/asr/test_whisper.py", line 19, in <module> model = WhisperModel(model_size_or_path=path, device="cuda", local_files_only=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/asr/lib/python3.12/site-packages/faster_whisper/transcribe.py", line 145, in init self.model = ctranslate2.models.Whisper( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: CUDA failed with error CUDA driver version is insufficient for CUDA runtime version
查资料:
里面介绍最新的1.0.3仅支持CUDA 12,如果CUDA是11.x那么需要将ctranslate2从4.x降级到3.x,
pip install --force-reinstall ctranslate2==3.24.0
降级后会有一些警告信息,但是可以正常运行了。