#4174 TaskCfgVTT(is_cuda=True, uuid='51f23485d0', cache_folder='F:/win-pyvideotrans-v3.99-418/tmp/11392/51f23485d0', target_di

103.3* Posted at: 2 hours ago 👁18

语音识别阶段出错 [faster-whisper(本地)] 出错了,可能内存或显存不足 Model:large-v3 GPU0
Traceback (most recent call last):
File "videotrans\configure\_base.py", line 285, in _new_process
File "concurrent\futures\_base.py", line 458, in result
File "concurrent\futures\_base.py", line 403, in __get_result
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.

Traceback (most recent call last):
File "videotrans\configure\_base.py", line 285, in _new_process
File "concurrent\futures\_base.py", line 458, in result
File "concurrent\futures\_base.py", line 403, in __get_result
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 105, in run
File "videotrans\task\trans_create.py", line 361, in recogn
File "videotrans\recognition\__init__.py", line 293, in run
File "videotrans\recognition\_base.py", line 143, in run
File "videotrans\recognition\_overall.py", line 33, in _exec
File "videotrans\recognition\_overall.py", line 105, in _faster
File "videotrans\configure\_base.py", line 303, in _new_process
RuntimeError: 出错了,可能内存或显存不足 Model:large-v3 GPU0
Traceback (most recent call last):
File "videotrans\configure\_base.py", line 285, in _new_process
File "concurrent\futures\_base.py", line 458, in result
File "concurrent\futures\_base.py", line 403, in __get_result
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.
TaskCfgVTT(is_cuda=True, uuid='51f23485d0', cache_folder='F:/win-pyvideotrans-v3.99-418/tmp/11392/51f23485d0', target_dir='F:/Math.Tutor.DVD.Complete.Collection.XviD/Math.Tutor.DVD.Basic.Math/_video_out/24.adding.and.subtracting.fractions.and.finding.the.common.denominator-avi', source_language='英语', source_language_code='en', source_sub='F:/Math.Tutor.DVD.Complete.Collection.XviD/Math.Tutor.DVD.Basic.Math/_video_out/24.adding.and.subtracting.fractions.and.finding.the.common.denominator-avi/en.srt', source_wav='F:/win-pyvideotrans-v3.99-418/tmp/11392/51f23485d0/en.wav', source_wav_output='F:/Math.Tutor.DVD.Complete.Collection.XviD/Math.Tutor.DVD.Basic.Math/_video_out/24.adding.and.subtracting.fractions.and.finding.the.common.denominator-avi/en.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='F:/Math.Tutor.DVD.Complete.Collection.XviD/Math.Tutor.DVD.Basic.Math/_video_out/24.adding.and.subtracting.fractions.and.finding.the.common.denominator-avi/zh-cn.srt', target_wav='F:/win-pyvideotrans-v3.99-418/tmp/11392/51f23485d0/target.wav', target_wav_output='F:/Math.Tutor.DVD.Complete.Collection.XviD/Math.Tutor.DVD.Basic.Math/_video_out/24.adding.and.subtracting.fractions.and.finding.the.common.denominator-avi/zh-cn.m4a', name='F:/Math.Tutor.DVD.Complete.Collection.XviD/Math.Tutor.DVD.Basic.Math/24.adding.and.subtracting.fractions.and.finding.the.common.denominator.avi', noextname='24.adding.and.subtracting.fractions.and.finding.the.common.denominator', basename='24.adding.and.subtracting.fractions.and.finding.the.common.denominator.avi', ext='avi', dirname='F:/Math.Tutor.DVD.Complete.Collection.XviD/Math.Tutor.DVD.Basic.Math', shound_del_name=None, translate_type=13, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='No', voice_autorate=True, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='en', recogn_type=0, model_name='large-v3', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False, subtitle_language=None, app_mode='biaozhun', subtitles='', targetdir_mp4='F:/Math.Tutor.DVD.Complete.Collection.XviD/Math.Tutor.DVD.Basic.Math/_video_out/24.adding.and.subtracting.fractions.and.finding.the.common.denominator-avi/24.adding.and.subtracting.fractions.and.finding.the.common.denominator.mp4', novoice_mp4='F:/win-pyvideotrans-v3.99-418/tmp/11392/51f23485d0/novoice.mp4', is_separate=False, embed_bgm=True, instrument=None, vocal=None, back_audio='', clear_cache=False, background_music=None, subtitle_type=3, only_out_mp4=True, recogn2pass=True, output_srt=2, copysrt_rawvideo=False)


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

5 Replies

这是由于显存或内存不足导致 faster-whisperlarge-v3 模型加载失败。错误信息明确指出“可能内存或显存不足”。

解决方案:

  1. 降低模型大小:将语音识别模型从 large-v3 更换为更小的模型,例如 mediumsmallbaselarge-v3 模型至少需要 10GB 显存。
  2. 调整高级设置:在菜单栏 工具/选项 -> 高级选项 -> 语音识别参数 中进行如下修改,以降低显存/内存占用:

    • CUDA数据类型:将 float32 改为 float16int8
    • 识别准确度beam_size:将 5 改为 1
    • 识别准确度best_of:将 5 改为 1
    • 启用上下文感知:将 true 改为 false
  3. 检查是否开启“二次识别”:如果主界面右上角勾选了“二次识别”,请取消勾选。同时处理多个视频时,二次识别会占用双倍显存。
  4. 启用预分割音频:在 高级选项 -> 语音识别参数 中,勾选 Whisper预分割音频?。这可以降低处理长音频时的峰值显存占用。
  5. 限制GPU任务数:在 高级选项 -> 通用设置 中,确保 GPU同时任务数[重启生效] 设置为 1(除非你的单卡显存大于20GB),然后重启软件。

如果以上调整后问题依旧,请尝试:

  • 确保你的系统物理内存(RAM)足够(建议16GB以上)。
  • 如果视频时长很长,可以尝试先将其分割为较短的片段进行处理。

请查阅相关文档:

我的显存有20g,不可能是这个原因

你的显存有20GB,理论上足够运行 large-v3 模型。问题可能出在软件配置或并发任务上。

请按以下步骤排查:

  1. 检查并调整高级设置

    • 打开 菜单 -> 工具/选项 -> 高级选项
    • 【通用设置】 区域,确保 GPU同时任务数[重启生效] 设置为 1。即使显存大,同时处理多个GPU任务也可能导致冲突。
    • 【语音识别参数】 区域,检查 CUDA数据类型 是否为 float16default。避免使用 int8,它可能导致不稳定。
    • 识别准确度beam_size识别准确度best_of 都设为 5(默认值),以确保模型稳定运行。
    • 确保 启用上下文感知true
  2. 关闭二次识别

    • 在主界面右上角,取消勾选“二次识别”。当批量处理视频时,二次识别会与首轮识别并行,可能导致显存需求翻倍。
  3. 检查CUDA环境

    • 确认你安装的CUDA版本是 12.8,并且已正确配置环境变量。在CMD中输入 nvcc -Vnvidia-smi 进行验证。
  4. 调整任务执行方式

    • 如果你在批量处理多个视频,请在 高级选项 -> 通用设置 中,勾选 批量翻译时强制串行。这可以避免多个任务同时竞争GPU资源。
  5. 重启软件

    • 修改了 GPU同时任务数 等需要重启生效的设置后,请完全关闭并重新启动 pyVideoTrans。

如果以上步骤仍无法解决问题,请提供软件根目录下 logs 文件夹中最新日志文件的底部更多行信息(约50行),以便进一步分析。

请查阅相关文档:

还是不行啊,该试的都试了

暂无法确定具体原因。请提供软件安装目录下的 logs/ 文件夹中最新的日志文件(复制底部约30行报错信息)以便分析。

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