#8147 语音识别阶段出错[faster-whisper(内置)] :Traceback (most recent call last): File

2602**b8 Posted at: 2 hours ago

语音识别阶段出错[faster-whisper(内置)] :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
MemoryError

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: :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
MemoryError
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加速
未选 降噪
已选 识别说话人,最大说话人数量3
语音识别:faster-whisper(内置), small
发音语言:zh
未选 降噪
代理地址: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)不足。faster-whisper 在音频特征提取时需分配大块 NumPy 数组,当前内存无法满足导致 MemoryError。当前日志显示未启用 CUDA 加速,并且开启了“识别说话人”,这会进一步加大内存开销。

解决方案:

  1. 关闭“识别说话人”(取消勾选),该功能会额外加载说话人模型并占用大量内存。
  2. 若仍不足,将语音识别模型从 small 改为 tiny 或 base,可明显降低内存占用。
  3. 在“高级选项 → 通用设置”中降低“CPU同时任务数”,并确保同时只运行一个任务。
  4. 关闭其他占用内存的程序,或适当增大系统虚拟内存。
  5. 如果机器有 NVIDIA 显卡,建议配置 CUDA 12.8 + cuDNN 9 后勾选“启用CUDA加速”,将计算转移到 GPU,可显著降低 CPU 内存压力。

另外,建议将输入文件复制到纯英文短路径下(如 D:/videos/xxx.mp4)重试,中文路径和过长路径也可能引发兼容性问题。
如果以上操作后仍报错,请提供 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