#5716 bad allocation:Traceback (most recent call last): File

210.6* Posted at: 4 hours ago

bad allocation:Traceback (most recent call last):
File "videotrans\process\_stt_faster.py", line 181, in faster_whisper
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
MemoryError: bad allocation

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 46, in run
File "videotrans\task\_stage_recogn.py", line 62, in recogn
File "videotrans\recognition\__init__.py", line 205, in run
File "videotrans\recognition\_base.py", line 91, in run
File "videotrans\recognition\_whisper.py", line 38, in _exec
File "videotrans\recognition\_whisper.py", line 124, in _faster
File "videotrans\configure\base.py", line 272, in _new_process
videotrans.configure.excepts.VideoTransError: bad allocation:Traceback (most recent call last):
File "videotrans\process\_stt_faster.py", line 181, in faster_whisper
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
MemoryError: bad allocation

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: G:/win-pyvideotrans-v4.05/output/vas/房子怪-1783527134.mp4,
输出结果保存到文件夹: G:/win-pyvideotrans-v4.05/房子怪-1783527134-mp4,
临时文件夹: G:/win-pyvideotrans-v4.05/tmp/2572/db54942c29
已选 清理已存在
已选 启用CUDA加速
未选 降噪
语音识别:faster-whisper(本地内置), model_name: large-v3-turbo, 发音语言: 英语, 断句方式:默认断句
翻译渠道:DeepSeek,原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:Yunxi(Male/CN), 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
字幕: 不嵌入字幕
代理地址:


=
system:Windows-10-10.0.22631-SP0
version:v4.05
frozen:True
language:zh
root_dir:G:/win-pyvideotrans-v4.05

1 Replies

这是 显存不足 导致的。你使用了 large-v3-turbo 模型并启用了 CUDA 加速,但你的 NVIDIA 显卡显存无法承载该模型的推理计算(large-v3-turbo 至少需要 6GB 以上可用显存)。

解决方案(按顺序尝试):

  1. 更换更小的模型:在主界面 ASR Channel 处,将模型由 large-v3-turbo 改为 smallbase,然后重新执行。
  2. 降低计算精度:打开 菜单 → 工具 → 高级选项 → 语音识别参数,将 计算数据类型 改为 int8(最省显存)。
  3. 关闭 CUDA 加速:取消勾选主界面的 CUDA加速,使用 CPU 处理(速度会慢,但可避免显存溢出)。如果你必须使用 GPU,请先尝试步骤1和2。
  4. 检查显存:确保其他占用显存的程序(如浏览器、游戏)已关闭。可在任务管理器中查看 GPU 专用内存使用量。

请查阅相关文档:

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. Dondate: ko-fi.com/jianchang512

Related resource