RuntimeError: Library cublas64_12.dll is not found or cannot be loaded

文章讲述了在使用guillaumekln/faster-whisper-large-v2模型进行语音识别时遇到的RuntimeError,由于cublas64_12.dll找不到。解决方法是找到并替换正确的CUDA版本(如CUDA11.8)中的cublas64_12.dll文件。
摘要由CSDN通过智能技术生成

运行guillaumekln/faster-whisper-large-v2模型进行语音识别的时候报错了

RuntimeError: Library cublas64_12.dll is not found or cannot be loaded

代码:

from faster_whisper import WhisperModel

model = WhisperModel("H:\\model\\guillaumekln\\faster-whisper-large-v2")

segments, info = model.transcribe("E:\\测试材料\\录音\\英语录音.mp3")
for segment in segments:
    print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))

报错日志:

Traceback (most recent call last):
  File "E:\software\web\pycharm\PyCharm Community Edition 2022.1\plugins\python-ce\helpers\pydev\pydevd.py", line 1491, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "E:\software\web\pycharm\PyCharm Community Edition 2022.1\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "E:/project/english_speak_service/Faster-whisper/WhisperTesk.py", line 5, in <module>
    segments, info = model.transcribe("E:\\测试材料\\录音\\英语录音.mp3")
  File "E:\software\web\anaconda3-2024.01.21\envs\common_transformers\lib\site-packages\faster_whisper\transcribe.py", line 344, in transcribe
    encoder_output = self.encode(segment)
  File "E:\software\web\anaconda3-2024.01.21\envs\common_transformers\lib\site-packages\faster_whisper\transcribe.py", line 762, in encode
    return self.model.encode(features, to_cpu=to_cpu)
RuntimeError: Library cublas64_12.dll is not found or cannot be loaded

直接原因:cublas64_12.dll动态链接库文件找不到。

间接原因:我这里安装的是cuda的版本是11,他这里运行的需要是cuda12.

参考帖子上的提示:

Windows got errpr: RuntimeError: Library cublas64_11.dll is not found or cannot be loaded · Issue #535 · SYSTRAN/faster-whisper · GitHub

解决:

1,找到cuda安装路径,我这里是 E:\software\web\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin

2,找到cublas64_11.dll,复制出来,改成cublas64_12.dll 

代码运行成功:

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值