#3131 TaskCfg(cache_folder='E:/win-pyvideotrans-v3.96/tmp/2532/b2496293be', target_dir='C:/Users/Administrator/Desktop/新建文件夹/3

111.14* Posted at: 7 hours ago 👁5

语音识别阶段出错 [faster-whisper(本地)] Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 256, in faster_whisper
File "faster_whisper\transcribe.py", line 586, in _batched_segments_generator
File "faster_whisper\transcribe.py", line 120, in forward
File "faster_whisper\transcribe.py", line 209, in generate_segment_batched
File "faster_whisper\transcribe.py", line 1400, in encode
RuntimeError: parallel_for failed: cudaErrorNoKernelImageForDevice: no kernel image is available for execution on the device

Traceback (most recent call last):
File "videotrans\task\job.py", line 106, in run
File "videotrans\task\trans_create.py", line 358, in recogn
File "videotrans\recognition\__init__.py", line 284, in run
File "videotrans\recognition\_base.py", line 141, in run
File "videotrans\recognition\_overall.py", line 63, in _exec
File "videotrans\recognition\_overall.py", line 142, in _faster
File "videotrans\configure\_base.py", line 276, in _new_process
RuntimeError: Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 256, in faster_whisper
File "faster_whisper\transcribe.py", line 586, in _batched_segments_generator
File "faster_whisper\transcribe.py", line 120, in forward
File "faster_whisper\transcribe.py", line 209, in generate_segment_batched
File "faster_whisper\transcribe.py", line 1400, in encode
RuntimeError: parallel_for failed: cudaErrorNoKernelImageForDevice: no kernel image is available for execution on the device
TaskCfg(cache_folder='E:/win-pyvideotrans-v3.96/tmp/2532/b2496293be', target_dir='C:/Users/Administrator/Desktop/新建文件夹/3-mp3', remove_noise=False, is_separate=False, detect_language='ja', subtitle_language=None, source_language='日语', target_language='简体中文', source_language_code='ja', target_language_code='zh-cn', source_sub='C:/Users/Administrator/Desktop/新建文件夹/3-mp3/ja.srt', target_sub='C:/Users/Administrator/Desktop/新建文件夹/3-mp3/zh-cn.srt', source_wav='E:/win-pyvideotrans-v3.96/tmp/2532/b2496293be/ja.wav', source_wav_output='C:/Users/Administrator/Desktop/新建文件夹/3-mp3/ja.m4a', target_wav='E:/win-pyvideotrans-v3.96/tmp/2532/b2496293be/target.wav', target_wav_output='C:/Users/Administrator/Desktop/新建文件夹/3-mp3/zh-cn.m4a', subtitles='', novoice_mp4='E:/win-pyvideotrans-v3.96/tmp/2532/b2496293be/novoice.mp4', noextname='3', shibie_audio=None, targetdir_mp4='C:/Users/Administrator/Desktop/新建文件夹/3-mp3/3.mp4', instrument=None, vocal=None, back_audio='', background_music=None, app_mode='tiqu', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='No', copysrt_rawvideo=False, clear_cache=False, translate_type=0, tts_type=0, recogn_type=0, model_name='large-v3-turbo', voice_autorate=False, video_autorate=False, cuda=True, name='C:/Users/Administrator/Desktop/3.mp3', basename='3.mp3', ext='mp3', dirname='C:/Users/Administrator/Desktop', shound_del_name=None, uuid='b2496293be', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=0, only_out_mp4=False, fix_punc=False, recogn2pass=True)


=
system:Windows-10-10.0.22000-SP0
version:v3.96
frozen:True
language:zh
root_dir:E:/win-pyvideotrans-v3.96

1 Replies

这是由于您的 NVIDIA 显卡(CUDA 设备)与当前 faster-whisper 库编译的 CUDA 内核版本不兼容导致的。具体错误 cudaErrorNoKernelImageForDevice: no kernel image is available for execution on the device 表明软件内置的 CUDA 计算能力不支持您的显卡。

  1. 确认您的显卡型号:在 CMD 中输入 nvidia-smi,查看您的显卡型号(例如 RTX 40系列、RTX 50系列等)。
  2. 解决方案

    • 方案一(推荐)关闭 CUDA 加速。在 pyVideoTrans 的“语音识别参数”设置中,找到 faster-whisper 相关选项,将“使用 CUDA”或类似勾选框取消勾选。这将强制软件使用 CPU 进行识别,虽然速度较慢,但可以绕过兼容性问题。
    • 方案二(高级)手动更新 faster-whisper 库。此方法仅适用于源码部署的用户(Windows 预打包版无法操作)。您需要卸载当前版本的 faster-whisper,并安装一个支持您显卡计算能力的新版本。通常,较新的显卡(如 50系列)需要更高版本的 faster-whisperctranslate2 库。您可以在项目的 issue 或讨论区搜索类似错误寻找特定版本的安装命令。
    • 方案三切换语音识别渠道。暂时使用其他不需要本地 GPU 加速的识别渠道,例如 Edge-TTS(如果支持识别)、OpenAI Whisper APIGoogle 语音识别 等在线服务。

根据知识库,对于 50 系显卡的类似错误有专门说明,您的情况很可能与此相关。

请查阅相关文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Related resource