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

51.159**6 Posted at: 1 hour ago

语音识别阶段出错[faster-whisper(内置)] 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\job.py", line 35, in run

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

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]当前工作模式: 转录并翻译字幕

未选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 英语, 断句方式:默认断句
翻译渠道:M2M100(内置),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
输出字幕格式: 单字幕
代理地址:http://127.0.0.1:10808


=
system:Windows-10-10.0.26200-SP0
version:v4.09
frozen:True
language:zh
root_dir:D:/software/3aisoftware/win-pyvideotrans-v4.09

1 Replies

#1 DeepSeek reply at 1 hour ago

这是内存分配失败导致的错误。mkl_malloc: failed to allocate memory 表示当前系统可用内存不足以加载 large-v3-turbo 模型(未启用CUDA加速时,模型完全依赖系统内存/虚拟内存运行)。

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

  1. 更换更小的模型
    将语音识别模型从 large-v3-turbo 改为 mediumsmallbase。模型越大占用内存越多,large-v3-turbo 未加速时通常需 6GB 以上空闲内存。
  2. 增大系统虚拟内存(页面文件)
    Windows 设置 → 系统 → 关于 → 高级系统设置 → 性能设置 → 高级 → 虚拟内存 → 更改为自定义大小,设置为物理内存的 1.5~2 倍,重启后再试。
  3. 关闭其他占用内存的程序,释放系统内存后重试。
  4. 配置 CUDA 加速(如有N卡)
    若你的电脑有 NVIDIA 显卡,安装 CUDA 12.8 + cuDNN 9.11 后,在软件中勾选 启用CUDA加速,将模型加载到显存中运行,可绕过系统内存不足的问题。但需注意显存也要足够(large-v3 约需 8GB,large-v3-turbo 约需 6GB)。
  5. 检查是否有多任务并行
    进入 菜单 → 工具 → 高级选项 → 通用设置,确认 GPU同时任务数 设为 1,避免同时加载多个模型实例。
  6. 尝试重新下载模型文件
    若模型文件下载不完整,也可能导致加载异常。可删除 软件目录/models/models--mobiuslabsgmbh--faster-whisper-large-v3-turbo,重新下载。

请查阅相关文档:

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