#4801 TaskCfg(cache_folder='F:/pyvideotrans/tmp3008/9bea85a223', target_dir='D:/Downloads/_video_out/AEDS-152_restored', remov

2409:8a6a* Posted at: 3 hours ago

语音识别阶段出错:[faster-whisper(本地)] 运行时错误:Traceback (most recent call last):
File "videotrans\process\_overall.py", line 93, in run
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: CUDA failed with error out of memory
:
Traceback (most recent call last):
File "videotrans\task\job.py", line 113, in run
File "videotrans\task\trans_create.py", line 354, in recogn
File "videotrans\recognition\__init__.py", line 236, in run
File "videotrans\recognition\_base.py", line 78, in run
File "videotrans\recognition\_overall.py", line 193, in _exec
RuntimeError: Traceback (most recent call last):
File "videotrans\process\_overall.py", line 93, in run
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: CUDA failed with error out of memory

TaskCfg(cache_folder='F:/pyvideotrans/tmp3008/9bea85a223', target_dir='D:/Downloads/_video_out/AEDS-152_restored', remove_noise=False, is_separate=False, detect_language='ja', subtitle_language=None, source_language='日语', target_language='日语', source_language_code='ja', target_language_code='ja', source_sub='D:/Downloads/_video_out/AEDS-152_restored/ja.srt', target_sub='D:/Downloads/_video_out/AEDS-152_restored/ja.srt', source_wav='F:/pyvideotrans/tmp3008/9bea85a223/ja.wav', source_wav_output='D:/Downloads/_video_out/AEDS-152_restored/ja.m4a', target_wav='F:/pyvideotrans/tmp3008/9bea85a223/target.wav', target_wav_output='D:/Downloads/_video_out/AEDS-152_restored/ja.m4a', subtitles='', novoice_mp4='F:/pyvideotrans/tmp3008/9bea85a223/novoice.mp4', noextname='AEDS-152_restored', shibie_audio=None, targetdir_mp4='D:/Downloads/_video_out/AEDS-152_restored/AEDS-152_restored.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', split_type=0, voice_autorate=False, video_autorate=False, cuda=True, name='D:/Downloads/AEDS-152_restored.mp4', basename='AEDS-152_restored.mp4', ext='mp4', dirname='D:/Downloads', shound_del_name=None, uuid='9bea85a223', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, auto_fix=True)


=
system:Windows-10-10.0.26200-SP0
version:v3.86
frozen:True
language:zh
root_dir:F:/pyvideotrans

1 Replies

语音识别阶段报错 CUDA out of memory,根本原因是 显卡显存不足large-v3 模型最低需要约 8GB 可用显存,但实际运行时其他程序(包括浏览器、其他软件)也会占用显存,导致分配给 faster-whisper 的显存不够。

解决方案(按推荐顺序尝试)

  1. 更换为更小的 ASR 模型
    在软件主界面将语音识别模型从 large-v3 改为 mediumsmallbase。这些模型占用的显存更少,处理速度也更快,准确率对于大多数场景已足够。
  2. 调整高级选项以降低显存占用
    点击菜单栏 工具/选项 -> 高级选项,在“语音识别参数”区域进行如下设置(牺牲少量精度换取低显存):

    • CUDA数据类型:改为 float16int8
    • 识别准确度beam_size:改为 1
    • 识别准确度best_of:改为 1
    • 启用上下文感知:取消勾选(设为 false
  3. 关闭其他占用显存的程序
    在运行前关闭浏览器、Chrome、视频播放器等大显存占用的程序,释放更多显存给软件使用。
  4. 检查 CUDA 版本与驱动
    确保已安装 CUDA 12.8cuDNN 9.11 以上版本(参见配置 CUDA 加速环境)。过旧的驱动或 CUDA 版本可能导致显存分配异常。
  5. 如果仍有问题:考虑使用更先进的版本
    v3.98-317 版本改进了多显卡显存选择逻辑,当存在多张显卡时会自动使用显存最大的一块。如果当前版本较旧(你使用的是 v3.86),可尝试升级至最新版本,可能有助于缓解显存不足问题。

请查阅相关文档:

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