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

123.138**9 Posted at: 1 hour ago

mkl_malloc: failed to allocate memory,Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 55, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: mkl_malloc: failed to allocate memory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 85, in faster_whisper
File "videotrans\process\stt_faster.py", line 78, in _create_model
File "videotrans\process\stt_faster.py", line 55, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: mkl_malloc: failed to allocate memory

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 70, in run
File "videotrans\task\_stage_recogn.py", line 65, in recogn
File "videotrans\recognition\__init__.py", line 233, in run
File "videotrans\recognition\_base.py", line 99, 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 264, 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 55, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: mkl_malloc: failed to allocate memory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 85, in faster_whisper
File "videotrans\process\stt_faster.py", line 78, in _create_model
File "videotrans\process\stt_faster.py", line 55, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: mkl_malloc: failed to allocate memory

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/84988/Desktop/20250922_c7be04ec84cf8423_535056910374_331012226713630_published_mp4_264_hd_taobao.mp4,
输出结果保存到文件夹: C:/Users/84988/Desktop/_video_out/20250922_c7be04ec84cf8423_535056910374_331012226713630_published_mp4_264_hd_taobao-mp4,
临时文件夹: D:/视频英文翻译工具/模型/tmp/87952/bf8936b260
已选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), small, 发音语言: 简体中文, 断句方式:默认断句
翻译渠道:Google(免费),原始语言:简体中文,目标语言:俄语, 已选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:Svetlana(Female/RU), 配音语言:俄语, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
字幕: 嵌入硬字幕
video_duration_ms=58400


=
system:Windows-10-10.0.26200-SP0
version:v4.12
frozen:True
language:zh_CN
root_dir:D:/视频英文翻译工具/模型

1 Replies

#1 DeepSeek reply at 1 hour ago

这是内存分配失败错误,核心原因是系统物理内存(RAM)不足,无法为 faster-whisper 分配加载模型所需的 MKL 内存。

原因分析

  • 错误 mkl_malloc: failed to allocate memory 明确指向底层 Intel MKL 数学库在申请内存时被系统拒绝,属于内存资源耗尽。
  • 日志显示你未启用 CUDA 加速,因此模型完全依赖 CPU + 内存运行,内存占用会进一步放大。
  • 同时注意到你的软件目录包含中文路径 D:/视频英文翻译工具/模型,这并非本错误主因,但强烈建议一并修正。

解决方案(按顺序尝试)

  1. 关闭其他占用内存的程序:浏览器多标签、其他 AI/剪辑软件等,确保有足够空闲物理内存(small 模型纯 CPU 推理建议至少预留 4GB 以上空闲内存)。
  2. 降低模型尺寸:当前是 small 模型,若内存紧张可尝试换用 basetiny 模型,内存占用更小。
  3. 降低计算数据类型资源占用:进入 菜单 → 工具/选项 → 高级选项 → 语音识别参数,将 计算数据类型 强制设为 int8(最省内存)。
  4. 减小搜索深度:同一面板中,将 识别准确度beam_sizebest_of 都调低为 1,并取消勾选 启用上下文感知
  5. 改用更省内存的识别渠道:如机器内存确实偏小,可改用 Whisper.cpp(Win内置) 渠道,其 CPU 内存占用通常低于 faster-whisper。
  6. 修正软件路径(强烈建议):当前软件位于 D:/视频英文翻译工具/模型,包含中文目录,容易引发各类兼容问题。建议将整个软件移动到纯英文数字路径,如 D:/pyVideoTrans,再重试。
  7. 如有 N 卡则启用 CUDA:若有 NVIDIA 显卡,配置好 CUDA 12.8 + cuDNN 9 后勾选 启用CUDA加速,可将计算负载从内存转移到显存,显著降低内存压力。
若以上方法均无效且内存本身充足,请提供软件安装目录下 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