#8148 语音识别阶段出错[faster-whisper(内置)] Unable to allocate 546. MiB for an array with shape (1, 179003, 400) and data type float64:

2602**b8 Posted at: 2 hours ago

语音识别阶段出错[faster-whisper(内置)] Unable to allocate 546. MiB for an array with shape (1, 179003, 400) and data type float64:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 121, 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 546. MiB for an array with shape (1, 179003, 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\speech2text.py", line 97, 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 546. MiB for an array with shape (1, 179003, 400) and data type float64:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 121, 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 546. MiB for an array with shape (1, 179003, 400) and data type float64
trk=[SpeechToText]: uuid='e8b8ebec5f', proxy_str='http://127.0.0.1:7897', cfg=[TaskCfgSTT]
原始输入文件名: D:/Baasir/Documents/We Tried China's WORST Products.mp4,
输出结果保存到文件夹: D:/论文版/参考文献/win-pyvideotrans-v4.16-1/output/recogn,
临时文件夹: D:/win-pyvideotrans-v4.16-1/tmp/26500/e8b8ebec5f
未启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), small
发音语言:en
未选 降噪
代理地址:http://127.0.0.1:7897, precent=1, hasend=False, should_recogn=True, should_trans=False, should_dubbing=False, should_hebing=False, out_format='srt', copysrt_rawvideo=False, spk_insert=True


=
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)不足或内存碎片过多导致 NumPy 在 CPU 上分配约 546MB 数组时失败,并非模型或渠道配置错误。你的日志显示未启用 CUDA,正在使用 CPU 运行 faster-whisper 的 small 模型,STFT 特征提取阶段需要一次连续大块内存,若电脑同时运行了其他程序或 CPU 同时任务数过高,就会触发 Unable to allocate。

解决方案,请按顺序尝试:

  1. 释放内存后重试:关闭浏览器、微信等占用较多内存的程序,或重启电脑后再运行。若同时翻译多个视频,请到 菜单 → 工具/选项 → 高级选项 → 通用设置 将 CPU同时任务数 临时调为 1,避免并行任务挤占内存。
  2. 降低模型尺寸:在主界面语音识别渠道中将模型从 small 换为 tiny 或 base,可显著减少内存与 CPU 压力。
  3. 检查路径:当前软件目录为 D:/win-pyvideotrans-v4.16-1,但输出目录为 D:/论文版/参考文献/...。请确认软件根目录和待处理文件路径均使用纯英文、数字的简单路径,例如 D:\pyVideoTrans,不要放在含中文、空格或特殊符号的目录中,否则还可能出现其他异常。
  4. 避免 C 盘或软件所在盘空间占满:临时文件默认在软件目录下的 tmp/ 中,请确保所在磁盘剩余空间足够。
  5. 如仍失败:若物理内存充足但依旧报错,可能是系统内存碎片或环境异常,建议重启软件后直接选择 base 模型重试;若问题持续,请提供 logs/ 目录下最新的日志文件(底部约30行)以及系统总物理内存大小。

请查阅相关文档:

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