#8940 语音识别阶段出错 [faster-whisper(本地)] Traceback (most recent call last): File

2409**7878 Posted at: 36 minutes ago

语音识别阶段出错 [faster-whisper(本地)] Traceback (most recent call last):
File "videotrans\process\_overall.py", line 229, in run
File "faster_whisper\transcribe.py", line 1851, in restore_speech_timestamps
File "faster_whisper\transcribe.py", line 1213, in generate_segments
File "faster_whisper\transcribe.py", line 1446, in generate_with_fallback
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\_speech2text.py", line 146, in recogn
File "videotrans\recognition\__init__.py", line 245, in run
File "videotrans\recognition\_base.py", line 80, in run
File "videotrans\recognition\_overall.py", line 182, in _exec
RuntimeError: Traceback (most recent call last):
File "videotrans\process\_overall.py", line 229, in run
File "faster_whisper\transcribe.py", line 1851, in restore_speech_timestamps
File "faster_whisper\transcribe.py", line 1213, in generate_segments
File "faster_whisper\transcribe.py", line 1446, in generate_with_fallback
RuntimeError: CUDA failed with error out of memory

TaskCfg(cache_folder='C:/wu/win-pyvideotrans-v3.92/tmp/8984/056f44f5e7', target_dir='C:/wu/win-pyvideotrans-v3.92/output/recogn', remove_noise=False, is_separate=False, detect_language='ja', subtitle_language=None, source_language=None, target_language=None, source_language_code=None, target_language_code=None, source_sub=None, target_sub='C:/wu/win-pyvideotrans-v3.92/output/recogn/n1448.srt', source_wav=None, source_wav_output=None, target_wav=None, target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='n1448', shibie_audio='C:/wu/win-pyvideotrans-v3.92/tmp/8984/056f44f5e7/n1448-1795521132.4643457.wav', targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role=None, copysrt_rawvideo=False, clear_cache=False, translate_type=None, tts_type=None, recogn_type=0, model_name='medium', split_type=0, voice_autorate=False, video_autorate=False, cuda=True, name='C:/Users/wu/Desktop/n1448.mp4', basename='n1448.mp4', ext='mp4', dirname='C:/Users/wu/Desktop', shound_del_name=None, uuid='056f44f5e7', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=2, only_out_mp4=False)


=
system:Windows-10-10.0.26100-SP0
version:v3.92
frozen:True
language:zh
root_dir:C:/wu/win-pyvideotrans-v3.92

1 Replies

#1 DeepSeek reply at 36 minutes ago

这是显卡显存不足(OOM)导致的。你的配置为 medium 模型 + cuda=True,faster-whisper 在 GPU 上推理时显存需求超出物理显存上限。

解决方案(按优先级依次尝试)

1. 降低模型尺寸
将 识别模型 由 medium 改为 small 或 base。medium 模型 GPU 推理通常需要 5GB 以上可用显存。

2. 降低计算精度
菜单 → 工具/选项 → 高级选项 → 语音识别参数,将 计算数据类型 由 default 改为:

  • float16(英伟达显卡首选,显存占用约为 float32 的一半)
  • 若仍爆显存,改为 int8(最省显存)

3. 降低搜索深度
同一面板内,将 识别准确度beam_size 和 识别准确度best_of 均由默认 5 改为 1。

4. 关闭上下文感知
将 启用上下文感知 设为关闭(该选项会显著占用额外显存)。

5. 限制并发
高级选项 → 通用设置 → GPU同时任务数 设为 1,并确保软件没有在后台并行处理其他视频任务。

6. 释放显存
关闭其他占用显卡的程序(浏览器硬件加速、游戏、其他 AI 软件),必要时重启电脑后再运行。

7. 兜底方案
若以上均无效,直接取消主界面 CUDA加速 勾选,改用 CPU 运行(速度慢但不会 OOM)。

注意:你当前使用 v3.92 版本较旧,建议升级到最新 v4.19,新版对显存占用和自适应显卡选择做了优化。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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.

Dondate via ko-fi.com

Related resource