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

2409**5012 Posted at: 11 hours ago

语音识别阶段出错[faster-whisper(内置)] 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\trans
......
rocess

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
[TransCreate]翻译视频: self.is_copy_video=True,self.video_codec_num=264,self.is_audio_trans=False,self.video_info={'video_fps': 30.0, 'r_frame_rate': 30.0, 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 1080, 'height': 1920, 'time': 27538, 'streams_len': 2, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}
[TaskCfgVTT]当前工作模式: 翻译视频 批量翻译模式
原始输入文件名: C:/Users/WIN10/Desktop/maps51.mp4,
输出结果保存到文件夹: C:/Users/WIN10/Desktop/导出/maps51-mp4,
临时文件夹: D:/翻译软件/tmp/11000/c81cea2d13
已选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 简体中文, 断句方式:默认断句
翻译渠道:Google(免费),原始语言:简体中文,目标语言:日语, 未选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:Nanami(Female/JP), 配音语言:日语, 未选 二次语音识别
音量:+0%, 语速:+1%, 未选 音频加速, 未选 视频慢速
未选 移除字幕间空隙, 未选 强制对齐字幕和声音
字幕: 不嵌入字幕
已选 仅输出mp4


=
system:Windows-10-10.0.19045-SP0
version:v4.12
frozen:True
language:zh_CN
root_dir:D:/翻译软件

1 Replies

#1 DeepSeek reply at 11 hours ago

这是由于物理内存不足导致的:当前未启用 CUDA 加速,large-v3-turbo 模型在 CPU 上加载时需占用数 GB 内存(float32 下更高),加上视频解码、其他软件占用,导致 MKL 内存分配失败。

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

  1. 更换更小的模型:把语音识别模型从 large-v3-turbo 换成 smallmedium(主界面第 2 行语音识别处的模型下拉框)。这是最直接有效的方法。
  2. 降低计算精度为 int8:进入 菜单 → 工具/选项 → 高级选项 → 语音识别参数,将 计算数据类型 设为 int8(最省内存,可降低约一半以上内存占用),识别准确度beam_sizebest_of 都设为 1,并取消勾选 启用上下文感知
  3. 降低并发数量:在 高级选项 → 通用设置 中,将 CPU同时任务数 设为 1GPU同时任务数 设为 1(修改后需重启软件)。若同时翻译多个视频,请改为逐个处理。
  4. 释放内存:关闭浏览器、剪辑软件等占用内存较大的程序后重试。同时可适当增大系统虚拟内存(页面文件)——Win10:右键「此电脑」→属性→高级系统设置→性能设置→高级→虚拟内存,设为自动管理或手动设到 8GB 以上。
  5. 启用 GPU 加速(如有 N 卡):安装 CUDA 12.8+ 与 cuDNN 9.11+,并在主界面勾选 启用CUDA加速,可大幅降低对系统内存的压力。
  6. 清理临时缓存:若任务曾中途中断,进入软件根目录 tmp/ 文件夹,清空内部临时切片文件,避免磁盘/内存被历史缓存挤占。
注意:内存不足时,即便模型能加载,运行过程中也极易崩溃并报 BrokenProcessPool,建议优先按第 1、2 条处理。

请查阅相关文档:

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