#3180 TaskCfg(cache_folder='D:/win-pyvideotrans-v3.96/tmp/14496/7e66d678a5', target_dir='D:/ytvideo/_video_out/Historical Tyra

223.73* Posted at: 16 hours ago 👁11

语音识别阶段出错 [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/14496/7e66d678a5', 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/14496/7e66d678a5/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/14496/7e66d678a5/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/14496/7e66d678a5/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='7e66d678a5', 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 版本与显卡计算能力不匹配导致的。错误信息 cudaErrorNoKernelImageForDevice: no kernel image is available for execution on the device 表明当前安装的 CUDA 版本(或 faster-whisper 编译版本)不支持你的显卡。

  1. 确认显卡型号和计算能力:在 CMD 中输入 nvidia-smi 查看显卡型号。然后根据 NVIDIA 官方文档查询其计算能力(Compute Capability)。例如,RTX 40系显卡(如 4060, 4070)的计算能力为 8.9。
  2. 检查并升级 CUDA 版本:软件内置支持 CUDA 12.8。但如果你使用的是较新的显卡(如 RTX 50系列),可能需要更高版本的 CUDA。请访问 NVIDIA 官网下载并安装与你的显卡兼容的最新 CUDA 版本(如 CUDA 12.8 或更高)。
  3. 临时解决方案:如果不想升级 CUDA,可以在软件设置中关闭 CUDA 加速。在“语音识别参数”或“高级选项”中,找到 faster-whisper 相关设置,将 cuda 选项设置为 False。这将使用 CPU 进行识别,速度会变慢,但可以绕过此错误。
  4. 验证安装:安装新 CUDA 后,重启电脑,并在 CMD 中运行 nvcc -V 确认版本,运行 nvidia-smi 确认驱动和显卡状态正常。

请查阅相关文档:

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