#6807 mkl_malloc: failed to allocate memory:Traceback (most recent call last): File

211.75.**4 Posted at: 9 hours ago

mkl_malloc: failed to allocate memory:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 182, in faster_whisper
File "faster_whisper\transcribe.py", line 1851, in restore_speech_timestamps
File "faster_whisper\transcribe.py", line 1190, in generate_segments
File "faster_whisper\transcribe.py", line 1400, in encode
RuntimeError: mkl_malloc: failed to allocate memory

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 66, in run
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: mkl_malloc: failed to allocate memory:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 182, in faster_whisper
File "faster_whisper\transcribe.py", line 1851, in restore_speech_timestamps
File "faster_whisper\transcribe.py", line 1190, in generate_segments
File "faster_whisper\transcribe.py", line 1400, in encode
RuntimeError: mkl_malloc: failed to allocate memory

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: C:/Users/irol0/Desktop/Claude Class/Agents and workflows/Agents and workflows_03.mp4,
输出结果保存到文件夹: C:/Users/irol0/Desktop/Claude Class/Agents and workflows/_video_out/Agents and workflows_03-mp4,
临时文件夹: C:/Users/irol0/AppData/Local/Programs/ffmpeg/bin/win-pyvideotrans-v4.09/tmp/10984/fa83eb6838
已选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 英语, 断句方式:默认断句
翻译渠道:Gemini AI,原始语言:英语,目标语言:繁体中文, 已选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:YunJhe(Male/TW), 配音语言:繁体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 未选 音频加速, 已选 视频慢速
字幕: 嵌入硬字幕


=
system:Windows-10-10.0.19045-SP0
version:v4.09
frozen:True
language:zh
root_dir:C:/Users/irol0/AppData/Local/Programs/ffmpeg/bin/win-pyvideotrans-v4.09

1 Replies

#1 DeepSeek reply at 9 hours ago

mkl_malloc: failed to allocate memory 表示 Intel MKL 数学库无法分配足够的内存。当前您未启用 CUDA 加速,使用 CPU 运行 large-v3-turbo 模型,该模型在 CPU 模式下需要大量系统内存,内存不足时即触发此错误。

解决方法

  1. 降低语音识别模型:主界面语音识别渠道选择 faster-whisper(内置),模型从 large-v3-turbo 改为 mediumsmall,CPU 模式下内存占用大幅降低。
  2. 调整计算数据类型菜单 → 工具 → 高级选项 → 语音识别参数 → 将 计算数据类型default 改为 int8,可显著减少内存消耗。
  3. 启用 CUDA 加速(如有 NVIDIA 显卡):确认已安装 CUDA 12.8 及 cuDNN 9.11 后,在主界面勾选 CUDA加速。若未安装,可参考 Windos上配置CUDA和cuDNN
  4. 移动视频到简单路径:当前视频路径 C:/Users/irol0/Desktop/Claude Class/Agents and workflows/ 包含空格,建议将视频移至纯英文、无空格目录(如 D:/videos/)后重新处理。
  5. 释放系统内存:处理前关闭其他占用内存较大的程序,或增加系统虚拟内存大小。
  6. 过滤较短视频:若上述仍失败,说明当前机器内存难以支撑该模型,建议将识别渠道更换为 Whisper.cpp(Win内置) 并选择较小的 ggml-medium.bin 模型。
Thinking...
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

Related resource