#5920 Failed to initialize pythonnetTraceback (most recent call last):

240e:39c* Posted at: 4 hours ago

Failed to initialize pythonnet
Traceback (most recent call last):
File "H:\pyvideotrans\videotrans\task\only_one.py", line 47, in run

trk.recogn()

File "H:\pyvideotrans\videotrans\task\_stage_recogn.py", line 62, in recogn

raw_subtitles = run_recogn(

File "H:\pyvideotrans\videotrans\recognition\__init__.py", line 205, in run

return _cls(**kwargs).run()  # type:ignore

File "H:\pyvideotrans\videotrans\recognition\_base.py", line 92, in run

res = self._exec()

File "H:\pyvideotrans\videotrans\recognition\_whispernet.py", line 89, in _exec

raise SpeechToTextError("Failed to initialize pythonnet")

videotrans.configure.excepts.SpeechToTextError: Failed to initialize pythonnet

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: G:/1.mp4,
输出结果保存到文件夹: G:/_video_out/1-mp4,
临时文件夹: H:/pyvideotrans/tmp/28280/5c7d88d507
已选 清理已存在
未选 启用CUDA加速
未选 降噪
已选 识别说话人,最大说话人数量3
语音识别:Whisper.NET, model_name: ggml-large-v3.bin, 发音语言: 英语, 断句方式:默认断句
翻译渠道:微软(免费),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入硬字幕
已选 分离人声与背景声, 已选 重新嵌入背景声, 背景音量0.8, 背景声音时长 短于 视频时长时: 拉长(降速播放),存在分离后的纯净人声文件,存在分离后的背景声音文件
代理地址:


=
system:Windows-10-10.0.26100-SP0
version:v4.06
frozen:False
language:zh
root_dir:H:/pyvideotrans
Python: 3.10.19 (main, Oct 28 2025, 12:01:56) [MSC v.1944 64 bit (AMD64)]

1 Replies

你选择的语音识别渠道是 Whisper.NET,该渠道需要额外安装 pythonnet 依赖,否则会引发 Failed to initialize pythonnet 错误。

在源码部署环境下,请执行以下命令安装:

uv sync --extra dotnet

注意:该渠道仅支持 Windows 平台,且需要 .bin 格式的 ggml 模型文件(如 ggml-large-v3.bin),模型已存放在 models/ 目录下。

如果你不想安装 pythonnet,建议切换到 faster-whisper(本地内置) 渠道(不需要额外依赖,开箱即用),同样支持 NVIDIA GPU 加速。

请查阅相关文档:

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.

Dondate via ko-fi.com

Dondate via PayPal

Related resource