#6558 语音识别阶段出错[faster-whisper(内置)] Unable to allocate 2.19 GiB for an array with shape (1, 735774, 400) and data type float64:

54.215.**2 Posted at: 1 hour ago

语音识别阶段出错[faster-whisper(内置)] Unable to allocate 2.19 GiB for an array with shape (1, 735774, 400) and data type float64:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 162, in faster_whisper
File "faster_whisper\transcribe.py", line 916, in transcribe
File "faster_whisper\feature_extractor.py", line 215, in call
File "faster_whisper\feature_extractor.py", line 189, in stft
File "numpy\fft\_pocketfft.py", line 409, in rfft
File "numpy\fft\_pocketfft.py", line 70, in _raw_fft
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 2.19 GiB for an array with shape (1, 735774, 400) and data type float64

Traceback (most recent call last):

File "videotrans\task\job.py", line 35, in run

File "videotrans\task\job.py", line 101, in process_task

File "videotrans\task\_stage_recogn.py", line 62, in recogn

File "videotrans\recognition\__init__.py", line 211, in run

File "videotrans\recognition\_base.py", line 92, in run

File "videotrans\recognition\_whisper.py", line 41, in _exec

File "videotrans\recognition\_whisper.py", line 129, in _faster

File "videotrans\configure\base.py", line 270, in _new_process

videotrans.configure.excepts.VideoTransError: Unable to allocate 2.19 GiB for an array with shape (1, 735774, 400) and data type float64:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 162, in faster_whisper
File "faster_whisper\transcribe.py", line 916, in transcribe
File "faster_whisper\feature_extractor.py", line 215, in call
File "faster_whisper\feature_extractor.py", line 189, in stft
File "numpy\fft\_pocketfft.py", line 409, in rfft
File "numpy\fft\_pocketfft.py", line 70, in _raw_fft
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 2.19 GiB for an array with shape (1, 735774, 400) and data type float64
cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 批量翻译模式
原始输入文件名: D:/Backup/Documents/MEGA下载/Fabervaale – Blood,Sweat & Scalping Q1/1. Recorded Sessions/9. Live session 17 Feb 2026.mp4,
输出结果保存到文件夹: D:/Backup/Documents/MEGA下载/Fabervaale – Blood,Sweat & Scalping Q1/1. Recorded Sessions/_video_out/9. Live session 17 Feb 2026-mp4,
临时文件夹: D:/BaiduNetdiskDownload/d/tmp/20708/aa296d5539
未选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 英语, 断句方式:默认断句
翻译渠道:微软(免费),原始语言:英语,目标语言:繁体中文, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入硬字幕(双) 目标语言在上双字幕
代理地址:http://127.0.0.1:7897


=
system:Windows-10-10.0.19044-SP0
version:v4.09
frozen:True
language:zh
root_dir:D:/BaiduNetdiskDownload/d

1 Replies

该报错核心原因是:在未启用 CUDA 加速(纯 CPU)的情况下,使用 faster-whisper 的 large-v3-turbo 模型对较长音频进行梅尔频谱特征提取时,NumPy 需要一次性分配约 2.19 GiB 的内存数组,但当前可用内存不足,导致内存分配失败。

请按以下顺序尝试解决:

  1. 若有 NVIDIA 显卡:在主界面勾选「CUDA加速」,并确保已安装 CUDA 12.8+ 和 cuDNN 9.11+(验证方法:CMD 中 nvcc -Vnvidia-smi)。GPU 能大幅降低内存占用并提速。
  2. 若无 NVIDIA 显卡或不想装 CUDA:将「语音识别」中的模型由 large-v3-turbo 改为 mediumsmall,可显著降低内存需求。
  3. 菜单 -> 工具/选项 -> 高级选项 -> 语音识别参数 中:

    • 将「最长语音持续(秒)」调小(如 10~20 秒);
    • 勾选「Whisper预分割音频?」,让系统先将音频切成小段再识别,避免一次性把整段音频加载进内存。
  4. 运行任务前关闭其他大型程序,释放物理内存;或适当增大 Windows 虚拟内存(设置 -> 系统 -> 关于 -> 高级系统设置 -> 性能 -> 高级 -> 虚拟内存)。
  5. 如果视频时长很长(1 小时以上),可先用其他工具将视频/音频拆分为较短的片段再逐个翻译,降低单次识别压力。
  6. 若仍提示内存不足,可改用更轻量的内置渠道,如 whisper.cpp(内置)、针对中文的 Firered中文(内置),或在线 API(如 OpenAI 语音识别、字节语音识别等)。

请查阅相关文档:

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 via ko-fi.com

Dondate via PayPal

Related resource