#7702 语音识别阶段出错[faster-whisper(本地内置)] mkl_malloc: failed to allocate memory:Traceback (most recent call last): File

61.223**3 Posted at: 1 hour ago

语音识别阶段出错[faster-whisper(本地内置)] mkl_malloc: failed to allocate memory:Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 306, 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\job.py", line 35, in run

File "videotrans\task\job.py", line 100, in process_task

File "videotrans\task\trans_create.py", line 319, in recogn

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

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

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

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

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

videotrans.configure.excepts.VideoTransError: mkl_malloc: failed to allocate memory:Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 306, 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]当前工作模式: 转录并翻译字幕
原始输入文件名: D:/Downloads/Videos/!Submaker/german-gynecologist-double-penetration-xhGpB3E.mp4,
输出结果保存到文件夹: D:/Downloads/Videos/!Submaker/german-gynecologist-double-penetration-xhGpB3E-mp4,
临时文件夹: D:/program/videotrans/tmp/28284/b2c6283606
已选 清理已存在
未选 启用CUDA加速
未选 降噪
语音识别:faster-whisper(本地内置), model_name: large-v3-turbo, 发音语言: 德语, 断句方式:LLM重新断句
翻译渠道:DeepSeek,原始语言:德语,目标语言:简体中文, 已选 发送完整字幕
输出字幕格式: 单字幕
代理地址:http://127.0.0.1:7897


=
system:Windows-10-10.0.26200-SP0
version:v4.03
frozen:True
language:zh
root_dir:D:/program/videotrans

1 Replies

#1 DeepSeek reply at 1 hour ago

这是 CPU 内存(RAM)分配失败 导致的,不是显存问题——你当前未启用 CUDA 加速,faster-whisper 在纯 CPU 下运行 large-v3-turbo 模型,需要占用大量系统内存,mkl_malloc 是 Intel MKL 数学库申请内存失败时抛出的错误。

核心原因

  • 你用的是 large-v3-turbo 模型 + 纯 CPU 模式,该模型内存占用极大(正常需要 6~8GB 以上可用内存,加上 MKL 运算的额外开销)
  • 你的软件版本是 v4.03,属于较旧版本,建议先升级

解决方案(按优先级尝试)

1. 减小模型尺寸(最直接有效)
将语音识别模型从 large-v3-turbo 换成 medium 或 small,内存需求会大幅下降。

2. 启用 CUDA 加速(如果你有 N 卡)
你有 N 卡的话,强烈建议勾选 启用CUDA加速,让显存承担计算,避免占用系统内存。前提是需要配置好 CUDA 12.8 + cuDNN 9。

3. 升级到最新版本 v4.14
你当前是 v4.03,版本较旧。新版对内存管理和进程池有优化。

4. 降低单批处理压力
菜单 → 工具 → 高级选项 → 语音识别参数:

  • 将 计算数据类型 改为 int8(最省内存)
  • 将 识别准确度beam_size 和 best_of 调低为 1
  • 关闭 启用上下文感知

5. 检查系统内存
打开任务管理器,确认是否有足够空闲内存(建议至少 8GB 以上),关闭其他占内存的程序后重试。

6. 长视频分段处理
若视频本身很长,可先用其他工具切成较短片段分别处理。


如果以上调整后仍报错,请提供你的 显卡型号、系统物理内存大小,以便进一步判断是否硬件资源不足。

请查阅相关文档:

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