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

183.158**8 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 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 74, in _create_model
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 __ini
......
e_recogn.py", line 65, in recogn
File "videotrans\recognition\__init__.py", line 228, in run
File "videotrans\recognition\_base.py", line 97, 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 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 74, in _create_model
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]当前工作模式: 翻译视频 单视频模式
原始输入文件名: D:/AAA视频翻译/翻译测试 - 副本 (2) - 副本/1 (1).mp4,
输出结果保存到文件夹: D:/AAA视频翻译/翻译测试 - 副本 (2) - 副本/1 (1)-mp4,
临时文件夹: D://tmp/104488/fc565a39f0
未选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), small, 发音语言: 英语, 断句方式:默认断句
翻译渠道:Google(免费),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:Yunyang(Male/CN), 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
字幕: 不嵌入字幕
代理地址:http://127.0.0.1:7890


=
system:Windows-10-10.0.26100-SP0
version:v4.12
frozen:True
language:zh_CN
root_dir:D:/

1 Replies

#1 DeepSeek reply at 1 hour ago

mkl_malloc: failed to allocate memory 是 faster-whisper 在 CPU 模式下加载/运行模型时,底层数学运算库(MKL)无法分配所需内存导致的。常见原因是系统可用物理内存不足,或 MKL/OpenMP 线程冲突。

请按以下顺序排查解决:

1. 检查系统内存是否充足

  • small 模型在 CPU 模式下运行需要约 2GB 以上可用内存(不含系统占用)。请先关闭其他常驻程序(浏览器、编辑器等),必要时重启电脑后再试。

2. 降低模型尺寸

  • 将语音识别模型从 small 改为 tinybase(主界面语音识别渠道右侧模型下拉框),消耗内存显著减少。

3. 限制 CPU 同时任务数

  • 进入 菜单 → 工具/选项 → 高级选项 → 通用设置,检查 CPU同时任务数 是否设置过大(不应超过 CPU 核心数),建议设为 12

4. 启用 CUDA 加速(如果你有 NVIDIA 显卡)

  • 你当前未选中 启用CUDA加速。若电脑有 NVIDIA 显卡并已配置 CUDA 12.8 和 cuDNN 9.11,请勾选主界面的 启用CUDA加速,可大幅降低 CPU 内存压力。

5. 设置 OpenMP 环境变量避免线程冲突

  • 在系统环境变量中新建:

    • 变量名:KMP_DUPLICATE_LIB_OK
    • 变量值:TRUE
  • 保存后重启软件。

6. 简化文件路径

  • 你的视频路径为 D:/AAA视频翻译/翻译测试 - 副本 (2) - 副本/1 (1).mp4,包含中文、空格、括号等特殊字符。强烈建议将视频移至纯英文、无空格路径(例如 D:/test_001.mp4)后再执行,避免底层库解析异常。

7. 重试前清空临时目录

  • 打开软件根目录下的 tmp/ 文件夹,清空里面所有内容,再重新执行任务。

如果以上操作后仍报错,请提供软件目录 logs/ 文件夹中最新的日志文件(复制底部约30行)以及你的电脑内存大小、是否使用 NVIDIA 显卡,以便进一步分析。

请查阅相关文档:

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