#8150 Unable to allocate 126. MiB for an array with shape (57538, 576) and data type float32:Traceback (most recent call last)

2602**b8 Posted at: 2 hours ago

Unable to allocate 126. MiB for an array with shape (57538, 576) and data type float32:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 121, in faster_whisper
File "faster_whisper\transcribe.py", line 890, in transcribe
File "faster_whisper\vad.py", line 89, in get_speech_timestamps
File "faster_whisper\vad.py", line 335, in call
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 126. MiB for an array with shape (57538, 576) and data type float32

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 71, in run
File "videotrans\task\_stage_recogn.py", line 63, in recogn
File "videotrans\recognition\__init__.py", line 141, in run
File "videotrans\recognition\_base.py", line 101, in run
File "videotrans\recognition\_whisper.py", line 39, in _exec
File "videotrans\recognition\_whisper.py", line 136, in _faster
File "videotrans\configure\base.py", line 277, in _new_process
videotrans.configure.excepts.VideoTransError: Unable to allocate 126. MiB for an array with shape (57538, 576) and data type float32:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 121, in faster_whisper
File "faster_whisper\transcribe.py", line 890, in transcribe
File "faster_whisper\vad.py", line 89, in get_speech_timestamps
File "faster_whisper\vad.py", line 335, in call
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 126. MiB for an array with shape (57538, 576) and data type float32

trk=[TransCreate]: uuid='e8b8ebec5f', proxy_str='http://127.0.0.1:7897', cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: D:/Baasir/Documents/We Tried China's WORST Products.mp4,
输出结果保存到文件夹: D:/Baasir/Documents/_video_out/We Tried China's WORST Products-mp4,
临时文件夹: D:/win-pyvideotrans-v4.16-1/tmp/22664/e8b8ebec5f
已选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), small, 发音语言: 英语,
翻译渠道:Google(免费),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:Qwen3-TTS(内置), 角色:clone, 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 已选 视频慢速
已选 移除每条字幕配音开头和结尾静音缓冲
静音移除力度: default
字幕: 嵌入软字幕
代理地址: http://127.0.0.1:7897, precent=4, hasend=False, should_recogn=True, should_trans=True, should_dubbing=True, should_hebing=True, is_copy_video=False, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='', should_recogn2=False, do_diarize=True
video_duration_ms=1841139


=
system:Windows-10-10.0.19045-SP0
version:v4.16
frozen:True
language:zh_CN
root_dir:D:/win-pyvideotrans-v4.16-1

1 Replies

#1 DeepSeek reply at 2 hours ago

该错误是系统内存不足(RAM)或无法分配连续内存导致 faster-whisper 的 VAD 预处理在分配 126MiB 数组时失败,不是模型、翻译渠道或配音渠道问题。当前未启用 CUDA,且视频时长约 30 分钟,VAD 需要加载并切分整段音频,内存紧张时会触发 ArrayMemoryError。

解决方法:

  1. 关闭占用内存较大的程序(浏览器、游戏、设计软件等),确保系统剩余可用内存至少有 2GB。
  2. 增大 Windows 虚拟内存(页面文件):此电脑 → 属性 → 高级系统设置 → 性能设置 → 高级 → 虚拟内存更改,将其设为“系统管理大小”或手动设置为物理内存的 1.5~2 倍。
  3. 降低软件并发压力:进入 菜单 -> 工具/选项 -> 高级选项 -> 通用设置,将 CPU同时任务数 和 GPU同时任务数 调低(CPU 建议 1~2,GPU 保持 1)。
  4. 若视频很长且屡次失败,可先用剪辑工具将视频拆分为多个较短片段,再分别翻译。
  5. 可在高级选项中降低 beam_size 和 best_of 为 1,或改用更小的 tiny 模型,以减少整体内存占用。
  6. 重试时确认已选中“清理已生成”,避免旧文件占用磁盘和缓存资源。

请查阅相关文档:

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