#3178 TaskCfg(cache_folder='D:/win-pyvideotrans-v3.96/tmp/12556/28742ec0a9', target_dir='D:/ytvideo/_video_out/Historical Tyra

223.73* Posted at: 16 hours ago 👁13

语音识别阶段出错 [faster-whisper(本地)] Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 259, 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 282, 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 259, 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='D:/win-pyvideotrans-v3.96/tmp/12556/28742ec0a9', target_dir='D:/ytvideo/_video_out/Historical Tyrants_ Qin Shi Huang Chinese History-mp4', remove_noise=False, is_separate=False, detect_language='en', subtitle_language=None, source_language='英语', target_language='简体中文', source_language_code='en', target_language_code='zh-cn', source_sub='D:/ytvideo/_video_out/Historical Tyrants Qin Shi Huang Chinese History-mp4/en.srt', target_sub='D:/ytvideo/_video_out/Historical Tyrants Qin Shi Huang Chinese History-mp4/zh-cn.srt', source_wav='D:/win-pyvideotrans-v3.96/tmp/12556/28742ec0a9/en.wav', source_wav_output='D:/ytvideo/_video_out/Historical Tyrants Qin Shi Huang Chinese History-mp4/en.m4a', target_wav='D:/win-pyvideotrans-v3.96/tmp/12556/28742ec0a9/target.wav', target_wav_output='D:/ytvideo/_video_out/Historical Tyrants Qin Shi Huang Chinese History-mp4/zh-cn.m4a', subtitles='', novoice_mp4='D:/win-pyvideotrans-v3.96/tmp/12556/28742ec0a9/novoice.mp4', noextname='Historical Tyrants Qin Shi Huang Chinese History', shibie_audio=None, targetdir_mp4='D:/ytvideo/_video_out/Historical Tyrants Qin Shi Huang Chinese History-mp4/Historical Tyrants Qin Shi Huang Chinese History.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=4, tts_type=0, recogn_type=0, model_name='large-v3-turbo', voice_autorate=False, video_autorate=False, cuda=True, name='D:/ytvideo/Historical Tyrants Qin Shi Huang Chinese History.mp4', basename='Historical Tyrants Qin Shi Huang _ Chinese History.mp4', ext='mp4', dirname='D:/ytvideo', shound_del_name=None, uuid='28742ec0a9', 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.19045-SP0
version:v3.96
frozen:True
language:zh
root_dir:D:/win-pyvideotrans-v3.96

1 Replies

这是由于显卡CUDA计算能力与当前faster-whisper模型编译版本不匹配导致的。错误信息 cudaErrorNoKernelImageForDevice: no kernel image is available for execution on the device 表明你的显卡(设备)无法执行当前已安装的CUDA内核代码。

  1. 确认显卡型号和CUDA版本:在CMD中运行 nvidia-smi,查看你的显卡型号和已安装的CUDA驱动版本。同时运行 nvcc -V 查看CUDA Toolkit版本。根据知识库,软件内置支持CUDA 12.8。
  2. 分析问题根源:此错误常见于较新的显卡(如RTX 40系、50系)使用了旧版本的 faster-whisper 库,该库未包含针对新显卡计算能力(如sm89, sm90)编译的内核。
  3. 解决方案

    • 方案A(推荐,更新依赖):如果你是源码部署的用户,请尝试升级 faster-whisper 到最新版本,该版本通常已支持新显卡。在项目根目录执行 uv add faster-whisper --upgrade
    • 方案B(使用CPU模式):在软件设置中,暂时取消勾选“使用CUDA加速”,让语音识别在CPU上运行。这会导致速度变慢,但可以绕过显卡兼容性问题。
    • 方案C(使用其他识别渠道):切换到其他语音识别渠道,例如 openai-whisper(本地) 或在线API渠道(如OpenAI、阿里百炼Qwen3-ASR)。
    • 方案D(Windows预打包版用户):等待官方发布更新了底层库的新版本软件包,或尝试从源码部署并使用方案A。

请查阅相关文档:

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