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

103.144**0 Posted at: 1 day ago

语音识别阶段出错[faster-whisper(内置)] Unable to allocate 1.33 GiB for an array with shape (1, 444787, 400) and data type float64:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 164, 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 1.33 GiB for an array with shape (1, 444787, 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 102, in process_task

File "videotrans\task\speech2text.py", line 100, in recogn

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

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

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

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

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

videotrans.configure.excepts.VideoTransError: Unable to allocate 1.33 GiB for an array with shape (1, 444787, 400) and data type float64:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 164, 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 1.33 GiB for an array with shape (1, 444787, 400) and data type float64
[SpeechToText]语音转录: self.out_format='srt',self.copysrt_rawvideo=False,self.spk_insert=True
[TaskCfgSTT]
原始输入文件名: D:/Study_Materials/课程素材/音频/接地1.mp3,
输出结果保存到文件夹: D:/Software/pyvideotrans/output/recogn,
临时文件夹: D:/Software/pyvideotrans/tmp/28008/328fe92697
已启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo 断句方式:默认断句
发音语言:ru
未选 降噪
代理地址:http://127.0.0.1:7897


=
system:Windows-10-10.0.22631-SP0
version:v4.10
frozen:True
language:zh
root_dir:D:/Software/pyvideotrans

1 Replies

#1 DeepSeek reply at 1 day ago

这是显存或内存不足导致的记忆体分配失败,常见于使用了 large-v3-turbo 大模型且显卡显存不够,或计算数据类型占用过高。

请依次尝试以下操作:

  1. 降低模型尺寸:在语音识别渠道中将模型从 large-v3-turbo 改为 mediumsmalllarge-v3 系列基础运行需要约 6-8GB 显存。
  2. 调整计算数据类型:进入 菜单 → 工具 → 高级选项 → 语音识别参数,将 计算数据类型 由默认改为 int8(最省显存)或 float16(适合显卡)。
  3. 关闭上下文感知:在同样的高级选项中将 启用上下文感知 设为不勾选。
  4. 降低识别精度参数:将 beam_sizebest_of 都调为 1
  5. 若显存仍不足:可在确认 CUDA 配置正确的前提下,暂时关闭 启用CUDA加速,改用 CPU 运行(速度会慢但可正常处理)。
  6. 清理临时残留:关闭软件后,手动清空软件目录下 tmp/ 文件夹内的所有内容,避免残留缓存占用内存。

如果以上调整后仍然报错,请检查显卡是否可用的显存确实足够,并关闭其他占用显存的程序。

请查阅相关文档:

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