#8475 Whisper.net recognition failed: Failed to load the whisper model. at Whisper.net.WhisperFactory.CreateBuilder()

104.28**0 Posted at: 2 hours ago

Whisper.net recognition failed: Failed to load the whisper model.
at Whisper.net.WhisperFactory.CreateBuilder()
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Traceback (most recent call last):
File "videotrans\recognition\_whispernet.py", line 199, in _exec
Whisper.net.WhisperModelLoadException: Failed to load the whisper model.
at Whisper.net.WhisperFactory.CreateBuilder()
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 71, in run
File "videotrans\task\_stage_recogn.py", line 63, in recogn
File "videotrans\recognition\__init__.py", line 141, in run
File "videotrans\recognition\_base.py", line 101, in run
File "videotrans\recognition\_whispernet.py", line 282, in _exec
videotrans.configure.excepts.SpeechToTextError: Whisper.net recognition failed: Failed to load the whisper model.
at Whisper.net.WhisperFactory.CreateBuilder()
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

trk=[TransCreate]: uuid='cca3d5b262', proxy_str='http://127.0.0.1:10808', cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: G:/视频下载/YouTube/99999.mp4,
输出结果保存到文件夹: G:/视频下载/YouTube/_video_out/99999-mp4,
临时文件夹: D:/FFFFFFFFFFFFFFFFFFFFFF/win-pyvideotrans-v4.16/tmp/3544/cca3d5b262
已选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:Whisper.NET, , 发音语言: 英语, LLM纠错
翻译渠道:本地大模型(兼容OpenAI),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:Yunyang(Male/CN), 配音语言:简体中文, 已选 二次语音识别
音量:+0%, 语速:+0%, 未选 音频加速, 未选 视频慢速
未选 移除字幕间空隙, 已选 强制对齐字幕和声音
已选 移除每条字幕配音开头和结尾静音缓冲
静音移除力度: default
字幕: 嵌入硬字幕
已选 仅输出mp4
代理地址: http://127.0.0.1:10808, precent=4, hasend=False, should_recogn=True, should_trans=True, should_dubbing=True, should_hebing=True, is_copy_video=True, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='', should_recogn2=True, do_diarize=True
video_duration_ms=489366


=
system:Windows-10-10.0.26200-SP0
version:v4.16
frozen:True
language:zh_CN
root_dir:D:/FFFFFFFFFFFFFFFFFFFFFF/win-pyvideotrans-v4.16

5 Replies

#1 DeepSeek reply at 2 hours ago

Whisper.NET 渠道无法加载模型,通常是因为该渠道需独立部署相关 dll/运行库与模型文件,当前环境未配置完整(Whisper.NET 并非开箱即用渠道)。

处理建议:

  1. 按官方文档正确部署 Whisper.NET(含所需 dll 及模型文件),或
  2. 直接改用默认可用的 faster-whisper(内置) 渠道(推荐 large-v3-turbo 或 large-v3 模型),即可正常识别,无需额外部署。

如仍要使用 Whisper.NET,请提供软件安装目录下 logs/ 文件夹中最新日志底部约 30 行信息,以便进一步分析具体是 dll 缺失还是模型文件缺失。

请查阅相关文档:

#2 104.28**0 reply at 2 hours ago


Application started at 2026-10-26 10:53:11

Loading resources...
Loading main window...
Initializing UI...
SetupUI end...
import recognition ...
import tts ...
import translate ...
Get cache ...
Set default value ...
import voices list ...
Set tts voice ...
[DEBUG] Version: v4.16, Frozen:True, OS: win32
上次缓存的角色:Yunyang(Male/CN),字幕嵌入类型:1,发音语言:英语,目标语言:简体中文,目标语言代码:zh-cn,模型:distil-large-v3.5,TTS渠道[0]
show main window ...
Bind signal...
set cursor...
end
[DEBUG] app_cfg.proxy='http://127.0.0.1:10808'
[DEBUG] 可以使用 huggingface.co
[DEBUG] 可用 Nvidia 显卡数: 0
[DEBUG] 找到 0 个 Nvidia GPUs, 耗时: 17s
[DEBUG] 平台: Windows。正在按优先级检测最佳的 'h264' 编码器: ['nvenc', 'qsv', 'amf']
[DEBUG] CUDA 不可用,跳过 nvenc 测试。
[DEBUG] 正在测试编码器是否可用: h264_qsv...
[DEBUG] cpu_count=12,app_cfg.MAX_GPU_PROCESS=1, app_cfg.MAX_CPU_PROCESS=1, task_nums=1
[DEBUG] start 9 jobs
[WARNING] 硬件编码器 'h264_qsv' 不可用
[DEBUG] 正在测试编码器是否可用: h264_amf...
[DEBUG] 硬件编码器 'h264_amf' 可用。
[DEBUG] 已选择硬件编码器: h264_amf
[DEBUG] 最
......
oker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Traceback (most recent call last):
File "videotrans\recognition\_whispernet.py", line 199, in _exec
Whisper.net.WhisperModelLoadException: Failed to load the whisper model.
at Whisper.net.WhisperFactory.CreateBuilder()
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[ERROR] 单视频模式翻译失败:Whisper.net recognition failed: Failed to load the whisper model.
at Whisper.net.WhisperFactory.CreateBuilder()
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Traceback (most recent call last):
File "videotrans\recognition\_whispernet.py", line 199, in _exec
Whisper.net.WhisperModelLoadException: Failed to load the whisper model.
at Whisper.net.WhisperFactory.CreateBuilder()
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 71, in run
File "videotrans\task\_stage_recogn.py", line 63, in recogn
File "videotrans\recognition\__init__.py", line 141, in run
File "videotrans\recognition\_base.py", line 101, in run
File "videotrans\recognition\_whispernet.py", line 282, in _exec
videotrans.configure.excepts.SpeechToTextError: Whisper.net recognition failed: Failed to load the whisper model.
at Whisper.net.WhisperFactory.CreateBuilder()
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

#3 DeepSeek reply at 2 hours ago

核心原因:Whisper.NET 渠道在当前环境下不可用。日志显示「可用 Nvidia 显卡数: 0」「CUDA 不可用」,同时该渠道本身并非开箱即用——它要求源码部署并按文档单独下载 Whisper.NET 相关 dll 及对应 .bin 模型文件,预打包版直接选择该渠道必定报 Failed to load the whisper model(模型文件或运行库缺失,加载失败)。

解决方案(任选其一):

  1. 改用内置渠道(推荐,最快恢复)

    • 主界面「语音识别」改为 faster-whisper(内置)
    • 模型选择 small 或 medium(无显卡时更稳妥),若有 8G 以上内存可尝试 large-v3-turbo
    • 发音语言 已正确设为英语,保持即可
    • 注意:不要勾选「CUDA 加速」(本机无 N 卡)
  2. 坚持使用 Whisper.NET

    • 必须源码部署,不可用预打包版
    • 按文档下载并放置 Whisper.NET 所需 dll
    • 将 whisper 的 .bin 模型文件放入 软件目录/models 文件夹内
    • 确认模型文件名与界面所选模型一致
  3. 若改用 faster-whisper 后仍报模型加载失败,多为模型下载不完整,可删除 软件目录/models/ 下对应模型文件夹后重试,或手动下载覆盖。

请查阅相关文档:

#4 104.28**0 reply at 2 hours ago

Whisper.NET是AMD显卡加速,用faster-whisper(内置)显卡不会工作是吧

#5 DeepSeek reply at 2 hours ago

这是正确的。faster-whisper(内置) 的 GPU 加速依赖 CUDA,因此只支持 NVIDIA 显卡;AMD 显卡无法用它加速,只能退回 CPU 运行;而日志显示“可用 Nvidia 显卡数: 0”“CUDA 不可用”。

对应方案:

  1. 只要求能用、不追求速度:继续用 faster-whisper(内置),模型选 small 或 medium(12 核 CPU 可用,大模型会很慢),不要勾选「CUDA 加速」。
  2. 想用 AMD 显卡加速:只能走 Whisper.NET;必须用源码部署,并按文档下载对应的 dll 和 .bin 模型,预打包版无法直接使用。
  3. 想避开本地算力限制:改用在线识别渠道(如 OpenAI 语音识别 API、硅基流动等),这类渠道与本地显卡无关。

请查阅相关文档:

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