#1703 TaskCfg(cache_folder='D:/win-videotrans-v3.79/tmp39252/speech2text', target_dir='c:/users/jane/videos/pyvideotrans/recog

119.34* Posted at: 7 days ago 👁30

语音识别阶段出错:[faster-whisper(本地)] 运行时错误:Traceback (most recent call last):
File "videotrans\process\_overall.py", line 149, in run
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 113, in run
File "videotrans\task\_speech2text.py", line 140, in recogn
File "videotrans\recognition\__init__.py", line 236, in run
File "videotrans\recognition\_base.py", line 78, in run
File "videotrans\recognition\_overall.py", line 193, in _exec
RuntimeError: Traceback (most recent call last):
File "videotrans\process\_overall.py", line 149, in run
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

TaskCfg(cache_folder='D:/win-videotrans-v3.79/tmp39252/speech2text', target_dir='c:/users/jane/videos/pyvideotrans/recogn', remove_noise=False, is_separate=False, detect_language='en', subtitle_language=None, source_language=None, target_language=None, source_language_code=None, target_language_code=None, source_sub=None, target_sub='c:/users/jane/videos/pyvideotrans/recogn/Signing up for GitHub Account and GitHub Copilot on GitHub.srt', source_wav=None, source_wav_output=None, target_wav=None, target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='Signing up for GitHub Account and GitHub Copilot on GitHub', shibie_audio='D:/win-videotrans-v3.79/tmp39252/speech2text/Signing up for GitHub Account and GitHub Copilot on GitHub-1764575760.056657.wav', targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role=None, copysrt_rawvideo=False, clear_cache=False, translate_type=None, tts_type=None, recogn_type=0, model_name='large-v3-turbo', split_type=0, voice_autorate=False, video_autorate=False, cuda=False, name='G:/UE4网课/Udemy/GitHub Copilot - The Complete Guide learning from an expert/Signing up for GitHub Account and GitHub Copilot on GitHub.mp4', basename='Signing up for GitHub Account and GitHub Copilot on GitHub.mp4', ext='mp4', dirname='G:/UE4网课/Udemy/GitHub Copilot - The Complete Guide learning from an expert', shound_del_name=None, uuid='15fc5edf4e', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, auto_fix=False)


=
system:Windows-10-10.0.19045-SP0
version:v3.86
frozen:True
language:zh
root_dir:D:/win-videotrans-v3.79

1 Replies

错误 mkl_malloc: failed to allocate memory 表明系统内存(RAM)不足,导致语音识别模型无法加载或处理。这通常是因为使用了过大的模型(如 large-v3-turbo)或系统可用内存不足。

请按以下步骤解决:

  1. 更换更小的识别模型:在主界面第2行“语音识别”区域,将模型从 large-v3-turbo 更换为 mediumsmalltiny 最快但准确率最低,可作为测试选项。
  2. 调整识别模式:在主界面第2行,将识别模式从“整体识别”改为“批量推理”。该模式按时间切片处理,对内存压力更小。
  3. 关闭其他占用内存的程序:关闭浏览器、大型软件等,释放系统内存。
  4. 检查高级设置(如果以上无效)

    • 进入 菜单 -> 工具 -> 高级选项
    • 在“Faster/OpenAI/Whisper 语音识别微调”区域:

      • CUDA数据类型 改为 int8(如果已使用CUDA)。
      • 识别准确度 (beam_size)识别准确度 (best_of) 都改为 1
      • 确保 启用上下文感知False
    • 勾选“强制批量推理”。
  5. 检查文件路径:您的视频路径包含中文和空格(G:/UE4网课/Udemy/...)。虽然这不一定是直接原因,但为排除干扰,建议将视频文件复制到一个纯英文、无空格的短路径下(例如 D:/temp/video.mp4)再尝试处理。

如果问题依旧,请提供 D:/win-videotrans-v3.79/logs/ 目录下最新的日志文件以便进一步分析。

Post Your Reply
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.

Donate: https://ko-fi.com/jianchang512

Trending Questions