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

179.255**6 Posted at: 15 hours ago

语音识别阶段出错[faster-whisper(内置)] mkl_malloc: failed to allocate memory,Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 54, 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 54, 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 84, in faster_whisper
File "videotrans\process\stt_faster.py", line 73, in _create_model
File "videotrans\process\stt_faster.py", line 77, in _create_model
File "videotrans\process\stt_faster.py", line 54, 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 84, in run
File "videotrans\task\_stage_recogn.py", line 64, in recogn
File "videotrans\recognition\__init__.py", line 148, in run
File "videotrans\recognition\_base.py", line 101, in run
File "videotrans\recognition\_whisper.py", line 39, in _exec
File "videotrans\recognition\_whisper.py", line 136, in _faster
File "videotrans\configure\base.py", line 291, 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 54, 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 54, 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 84, in faster_whisper
File "videotrans\process\stt_faster.py", line 73, in _create_model
File "videotrans\process\stt_faster.py", line 77, in _create_model
File "videotrans\process\stt_faster.py", line 54, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
RuntimeError: mkl_malloc: failed to allocate memory

trk=翻译视频 单视频模式
选择音视频文件: D:/配音输出/0112e1b5ba6346e2d83446fde4971470.mp4,
输出目录: D:/配音输出/翻译配音结果/0112e1b5ba6346e2d83446fde4971470-mp4,
self.cfg.cache_folder='D:/BaiduNetdiskDownload/tmp/54724/cfc563d11a'
已选 清理已生成, 未选 CUDA加速
已选 降噪,降噪模型:dpdfnet2.onnx
语音识别:faster-whisper(内置), large-v3, 发音语言: 英语
最长语音持续(秒): 5s
最短语音持续(毫秒): 3000ms
静音分割持续毫秒: 600ms
语音阈值: 0.45
选择VAD: silero
计算数据类型:default
识别准确度beam_size:5
识别准确度best_of:5
启用上下文感知:False
重复惩罚:1.0
文本压缩率:2.4
Dont translation subtitle: self.cfg.source_language='英语',self.cfg.target_language='英语'
配音渠道:Edge-TTS(免费), 配音角色:Emily(Female/IE), 目标语言:英语
Volume:+5%, Speed:+0%, 已选 配音加速, 未选 视频慢速
已选 移除每条字幕配音开头结尾静音缓冲
静音移除力度: default
已选 识别说话人: 不限数量
说话人分离模型: built
嵌入硬字幕
中日韩字幕单行字符数:15, 其他语言字幕单行字符数:40
已选 分离人声背景声, Model:spleeter,已选 重新嵌入背景声, 背景音量变化倍数:1.0, 背景音短时循环D:/BaiduNetdiskDownload/tmp/54724/cfc563d11a/vocal.wavD:/BaiduNetdiskDownload/tmp/54724/cfc563d11a/instrument.wav
video duration:104080ms
video information:{'video_fps': 25.0, 'r_frame_rate': 25.0, 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 576, 'height': 1280, 'time': 104080, 'streams_len': 2, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}
self.cfg=TaskCfgVTT(uuid='cfc563d11a', name='D:/配音输出/0112e1b5ba6346e2d83446fde4971470.mp4', dirname='D:/配音输出', noextname='0112e1b5ba6346e2d83446fde4971470', basename='0112e1b5ba6346e2d83446fde4971470.mp4', ext='mp4', target_dir='D:/配音输出/翻译配音结果/0112e1b5ba6346e2d83446fde4971470-mp4', cache_folder='D:/BaiduNetdiskDownload/tmp/54724/cfc563d11a', is_cuda=False, source_language='英语', source_language_code='en', source_sub='D:/配音输出/翻译配音结果/0112e1b5ba6346e2d83446fde4971470-mp4/en.srt', source_wav='D:/BaiduNetdiskDownload/tmp/54724/cfc563d11a/en.wav', source_wav_output='D:/配音输出/翻译配音结果/0112e1b5ba6346e2d83446fde4971470-mp4/en.m4a', target_language='英语', target_language_code='en', target_sub='D:/配音输出/翻译配音结果/0112e1b5ba6346e2d83446fde4971470-mp4/en.srt', target_wav='D:/BaiduNetdiskDownload/tmp/54724/cfc563d11a/target-dubbing.wav', target_wav_output='D:/配音输出/翻译配音结果/0112e1b5ba6346e2d83446fde4971470-mp4/en-dubbing.m4a', translate_type=5, tts_type=0, volume='+5%', pitch='+0Hz', voice_rate='+0%', voice_role='Emily(Female/IE)', voice_autorate=True, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='en', recogn_type=0, model_name='large-v3', shibie_audio=None, remove_noise=True, enable_diariz=True, nums_diariz=0, rephrase=False, fix_punc=0, app_mode='biaozhun', subtitle_language=None, targetdir_mp4='D:/配音输出/翻译配音结果/0112e1b5ba6346e2d83446fde4971470-mp4/0112e1b5ba6346e2d83446fde4971470.mp4', novoice_mp4='D:/BaiduNetdiskDownload/tmp/54724/cfc563d11a/novoice.mp4', is_separate=True, embed_bgm=True, instrument='D:/BaiduNetdiskDownload/tmp/54724/cfc563d11a/instrument.wav', vocal='D:/BaiduNetdiskDownload/tmp/54724/cfc563d11a/vocal.wav', clear_cache=True, background_music='', subtitle_type=1, only_out_mp4=False, recogn2pass=False, output_srt=0, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=1.0, batch=False)
video_duration_ms=104080


=
system:Windows-10-10.0.19045-SP0
version:v4.18
frozen:True
language:zh_CN
root_dir:D:/BaiduNetdiskDownload

1 Replies

#1 DeepSeek reply at 15 hours ago

这是内存(RAM)分配失败。mkl_malloc: failed to allocate memory 表示在创建 faster-whisper large-v3 模型时物理内存不足,而这次又未勾选 CUDA,因此全程走 CPU 内存,large-v3 加降噪、人声分离、说话人分离同时占用资源,直接耗尽内存。

按以下顺序处理(1→4 可只做前两项即可解决):

  1. 降低模型尺寸:主界面语音识别模型由 large-v3 改为 large-v3-turbo、medium 或 small(large-v3 满血运行约需 8GB 以上可用内存)。
  2. 修改计算数据类型:菜单-工具/选项-高级选项-语音识别参数-计算数据类型 改为 int8(CPU 下最省内存),若有 NVIDIA 显卡可改 float16。
  3. 降低精度占用:将 识别准确度beam_size 和 best_of 由 5 改为 1,启用上下文感知 保持 False。
  4. 减少并行占用:先关闭浏览器等其他占内存程序;设置更多参数 里暂时取消 降噪、分离人声背景声、识别说话人(这三个都是纯 CPU 计算,且各自额外占内存),跑通后再逐个加回。另可在 Windows 系统属性中调大虚拟内存(分页文件)到 16GB 以上。
  5. 若你有 NVIDIA 显卡,安装 CUDA 12.8 + cuDNN 9.11 后勾选 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