#5582 [DEBUG] 开始说话人分离,使用 pyannote/speaker-diarization-3.1 模型[ERROR] 说话人分离出错'NoneType' object has no attribute 'write':Tracebac

103.151* Posted at: 20 hours ago

[DEBUG] 开始说话人分离,使用 pyannote/speaker-diarization-3.1 模型
[ERROR] 说话人分离出错'NoneType' object has no attribute 'write':Traceback (most recent call last):
File "videotrans\process\prepare_audio.py", line 369, in pyannote_speakers
File "videotrans\process\prepare_audio.py", line 333, in _get_diariz
File "pyannote\audio\core\pipeline.py", line 90, in from_pretrained

config_yml = hf_hub_download(

File "huggingface_hub\utils\_validators.py", line 114, in _inner_fn
File "huggingface_hub\file_download.py", line 1010, in hf_hub_download
File "huggingface_hub\file_download.py", line 1171, in _hf_hub_download_to_cache_dir
File "huggingface_hub\file_download.py", line 1738, in _download_to_tmp_and_move
File "huggingface_hub\file_download.py", line 451, in http_get
File "huggingface_hub\utils\tqdm.py", line 299, in _get_progress_bar_context
File "huggingface_hub\utils\tqdm.py", line 225, in init
File "tqdm\asyncio.py", line 24, in init
File "tqdm\std.py"
......
69, in pyannote_speakers
File "videotrans\process\prepare_audio.py", line 333, in _get_diariz
File "pyannote\audio\core\pipeline.py", line 90, in from_pretrained

config_yml = hf_hub_download(

File "huggingface_hub\utils\_validators.py", line 114, in _inner_fn
File "huggingface_hub\file_download.py", line 1010, in hf_hub_download
File "huggingface_hub\file_download.py", line 1171, in _hf_hub_download_to_cache_dir
File "huggingface_hub\file_download.py", line 1738, in _download_to_tmp_and_move
File "huggingface_hub\file_download.py", line 451, in http_get
File "huggingface_hub\utils\tqdm.py", line 299, in _get_progress_bar_context
File "huggingface_hub\utils\tqdm.py", line 225, in init
File "tqdm\asyncio.py", line 24, in init
File "tqdm\std.py", line 1098, in init
File "tqdm\std.py", line 1347, in refresh
File "tqdm\std.py", line 1495, in display
File "tqdm\std.py", line 459, in print_status
File "tqdm\std.py", line 452, in fp_write
File "tqdm\utils.py", line 140, in getattr
AttributeError: 'NoneType' object has no attribute 'write'

[DEBUG] [新进程任务 结束:title='Begin separating the speakers:pyannote'],耗时5.005030155181885s
[ERROR] 说话人分离失败,跳过 'NoneType' object has no attribute 'write'Traceback (most recent call last):
File "videotrans\process\prepare_audio.py", line 369, in pyannote_speakers
File "videotrans\process\prepare_audio.py", line 333, in _get_diariz
File "pyannote\audio\core\pipeline.py", line 90, in from_pretrained

config_yml = hf_hub_download(

File "huggingface_hub\utils\_validators.py", line 114, in _inner_fn
File "huggingface_hub\file_download.py", line 1010, in hf_hub_download
File "huggingface_hub\file_download.py", line 1171, in _hf_hub_download_to_cache_dir
File "huggingface_hub\file_download.py", line 1738, in _download_to_tmp_and_move
File "huggingface_hub\file_download.py", line 451, in http_get
File "huggingface_hub\utils\tqdm.py", line 299, in _get_progress_bar_context
File "huggingface_hub\utils\tqdm.py", line 225, in init
File "tqdm\asyncio.py", line 24, in init
File "tqdm\std.py", line 1098, in init
File "tqdm\std.py", line 1347, in refresh
File "tqdm\std.py", line 1495, in display
File "tqdm\std.py", line 459, in print_status
File "tqdm\std.py", line 452, in fp_write
File "tqdm\utils.py", line 140, in getattr
AttributeError: 'NoneType' object has no attribute 'write'
Traceback (most recent call last):
File "videotrans\task\trans_create.py", line 575, in diariz
File "videotrans\configure\base.py", line 272, in _new_process
videotrans.configure.excepts.VideoTransError: 'NoneType' object has no attribute 'write'Traceback (most recent call last):
File "videotrans\process\prepare_audio.py", line 369, in pyannote_speakers
File "videotrans\process\prepare_audio.py", line 333, in _get_diariz
File "pyannote\audio\core\pipeline.py", line 90, in from_pretrained

config_yml = hf_hub_download(

File "huggingface_hub\utils\_validators.py", line 114, in _inner_fn
File "huggingface_hub\file_download.py", line 1010, in hf_hub_download
File "huggingface_hub\file_download.py", line 1171, in _hf_hub_download_to_cache_dir
File "huggingface_hub\file_download.py", line 1738, in _download_to_tmp_and_move
File "huggingface_hub\file_download.py", line 451, in http_get
File "huggingface_hub\utils\tqdm.py", line 299, in _get_progress_bar_context
File "huggingface_hub\utils\tqdm.py", line 225, in init
File "tqdm\asyncio.py", line 24, in init
File "tqdm\std.py", line 1098, in init
File "tqdm\std.py", line 1347, in refresh
File "tqdm\std.py", line 1495, in display
File "tqdm\std.py", line 459, in print_status
File "tqdm\std.py", line 452, in fp_write
File "tqdm\utils.py", line 140, in getattr
AttributeError: 'NoneType' object has no attribute 'write'

19 Replies

说话人分离失败的根本原因是 tqdm 进度条在子进程中无法写入有效的文件对象(sys.stdout 可能为 None),导致模型下载过程崩溃。

解决方案(按优先级排序):

  1. 如果不需要说话人分离:在主界面取消勾选“识别说话人”,让流程跳过此阶段即可。
  2. 如果必须使用说话人分离

    • 在高级选项中,将“说话人分离模型”切换为“内置”(内置模型无需 huggingface token 和网络下载,稳定可靠)。
    • 如果您坚持使用 pyannote 模型,请设置环境变量 TQDM_DISABLE=1(关闭 tqdm 进度条输出),然后重启软件。
      设置方法:

      • Windows:在系统环境变量中新建变量名 TQDM_DISABLE,值 1
      • macOS/Linux:在终端执行 export TQDM_DISABLE=1 后再启动软件。
  3. 如果仍然失败:请确认您的 huggingface token 有效且已接受 pyannote/speaker-diarization-3.1 的用户协议(仅需操作一次)。可运行 huggingface-cli whoami 验证 token 是否正常工作。

请查阅相关文档:

没有内置,我就想用pyannote 模型,但我环境变量也设置了,还是无效

根据日志,根本原因在于 hf_hub_download 打印 tqdm 进度条时,子进程的 sys.stdoutNone,导致崩溃。设置环境变量 TQDM_DISABLE=1 后仍无效,可能是因为:

  1. 环境变量未正确传递到子进程(需要重启软件且确认变量生效)。
  2. huggingface_hub 内部仍尝试使用 tqdm,但你的 token 无效或未接受 pyannote 协议,导致下载失败,进而触发了这个异常。错误表面上是 tqdm,实际是下载模型文件失败。

请按以下步骤逐一排查:


1. 确认 Huggingface Token 配置正确且已接受协议

  • 打开软件 菜单 -> 工具 -> 高级选项 -> 语音识别参数,找到 Huggingface的token 输入框,必须填写 你的 Huggingface 用户 Access Token(创建地址)。
  • 访问 pyannote/speaker-diarization-3.1 并点击 “Agree and access repository”(只需同意一次)。
  • 之后重启软件,再尝试执行任务。

2. 强制关闭 tqdm 输出(彻底杜绝子进程 stdout 问题)

sp.exe 同目录下创建一个空文件 disable-tqdm.txt(文件名任意,确保内容为空),然后重启软件。或者在软件根目录创建这个文件:

touch disable-tqdm.txt

软件会在启动时检测该文件并强制禁用 tqdm 进度条。


3. 手动下载 pyannote 模型(绕过在线下载)

模型文件需要预先放置到正确的缓存目录,避免子进程在线下载触发 tqdm 报错。

  • 下载完整模型包:
    pyannote/speaker-diarization-3.1
    pytorch_model.binconfig.yamlparams.pt 等文件下载到一个本地目录。
  • 在软件目录 models/ 下创建文件夹 models--pyannote--speaker-diarization-3.1,把下载的文件放进去。

完成后重启软件,它就会直接读取本地缓存,不再尝试下载,从而避免 hf_hub_download 报错。


4. 如果以上均无效,请暂时切换回内置模型

软件内置的说话人分离模型(支持中英文)无需任何额外配置,效果稳定。待后续版本修复子进程 tqdm 兼容性问题后再切换回 pyannote。

内置模型设置方法: 高级选项 → 说话人分离模型 → 选择“内置”或“ali-cam++”。


5. 提供日志以便进一步分析

如果坚持使用 pyannote 且仍然报错,请提供 logs/ 目录下最新的 .log 文件(约底部 50 行)及软件 左上角版本号,以便排查是否是特定版本 bug。


最终建议: 若仅为简单说话人识别,使用软件内置模型即可满足需求。pyannote 模型对网络和子进程环境要求较高,当前报错属于 Huggingface 库的兼容性问题。

创建一个空文件 disable-tqdm.txt(文件名任意,确保内容为空)是啥意思;下载完整模型包:
pyannote/speaker-diarization-3.1
将 pytorch_model.bin、config.yaml、params.pt 等文件下载到一个本地目录。要解压么

  1. 关于创建空文件 disable-tqdm.txt:在软件根目录(sp.exe 所在文件夹)里新建一个文本文档,文件名随意(例如 disable-tqdm.txt),文件内容保持空白,不要写任何文字。软件启动时如果检测到这个空文件存在,就会强制关闭 tqdm 进度条输出,从而避免子进程因 stdout 为 None 而崩溃。操作完成后,重启软件再试。2. 关于下载模型包是否需要解压:从 Hugging Face 仓库 pyannote/speaker-diarization-3.1 下载的文件(如 pytorch_model.binconfig.yamlparams.pt 等)本身就是实际文件,不是压缩包,所以无需解压。将它们放到软件目录 models/models--pyannote--speaker-diarization-3.1/ 文件夹内即可。如果该文件夹不存在,请手动创建。注意,必须把文件直接放在该文件夹里,不能放在子文件夹中。

"D:\pyvideotrans\win-pyvideotrans-v4.03-0626\models\models--pyannote--speaker-diarization-3.1\blobs""D:\pyvideotrans\win-pyvideotrans-v4.03-0626\models\models--pyannote--speaker-diarization-3.1\refs""D:\pyvideotrans\win-pyvideotrans-v4.03-0626\models\models--pyannote--speaker-diarization-3.1\snapshots"现在models/models--pyannote--speaker-diarization-3.1/ 文件夹内已经有这仨了,我不管他们,照样放就行?;"D:\pyvideotrans\win-pyvideotrans-v4.03-0626\disable-tqdm.txt.txt"这样也就行?

关于 disable-tqdm.txt 文件

Windows 默认隐藏已知文件类型的扩展名,您新建文本文档并命名为 disable-tqdm.txt 后,实际文件名可能变为 disable-tqdm.txt.txt。软件只会检测 disable-tqdm.txt 这个精确文件名,因此无效。

建议做法

  1. 在软件根目录新建一个文本文档。
  2. 将文件名直接命名为 disable-tqdm (不加 .txt)
    如果系统提示“改变扩展名可能导致文件不可用”,请点击“是”或“确认”。
  3. 保存后文件图标会变为白色空白图标,内容为空即可。

完成后重启软件再试。


关于模型存放位置

您的 models/models--pyannote--speaker-diarization-3.1/ 下已有 blobs/refs/snapshots/ 三个子文件夹,这是 Hugging Face 缓存的标准结构。您下载的模型文件(如 pytorch_model.binconfig.yamlparams.pt 等)需要放入 snapshots/main/ 文件夹内(如果 snapshots/ 下没有 main/ 文件夹,请手动创建)。

正确路径示例

models/models--pyannote--speaker-diarization-3.1/snapshots/main/pytorch_model.bin
models/models--pyannote--speaker-diarization-3.1/snapshots/main/config.yaml
...

放置完成后,软件启动时会优先读取本地缓存,不再尝试在线下载,从而避免 tqdm 崩溃。


临时建议:如果以上步骤尝试后仍然报错,建议暂时将“说话人分离模型”切换回“内置”或“ali-cam++”。内置模型无需任何配置,效果稳定,等后续版本修复子进程 tqdm 兼容性问题后再切回 pyannote。

你告诉我怎么下载吧,我没看到下载选项,之后怎么放,详细教教我

好的,以下是手动下载 pyannote 模型文件并放到正确位置的详细步骤:

第一步:下载所需文件

方法一:在浏览器中逐一下载(推荐)

  1. 打开 pyannote/speaker-diarization-3.1 文件列表
  2. 你需要下载以下 5 个文件(点击每个文件名,然后点击页面中出现的 Download 按钮):

    • pytorch_model.bin(约 2.1GB,最大)
    • config.yaml
    • params.pt
    • pipeline.yaml
    • README.md(可选)

方法二:使用 Git LFS(需安装 git 和 git lfs)

git lfs clone https://huggingface.co/pyannote/speaker-diarization-3.1

然后把下载的文件夹中 pytorch_model.binconfig.yaml 等文件复制出来。

第二步:确认软件根目录位置

你的软件解压后路径是:
D:\pyvideotrans\win-pyvideotrans-v4.03-0626\

确认你在这个目录下可以看到 sp.exemodels 文件夹。

第三步:放置模型文件

  1. 进入 models 文件夹,找到 models--pyannote--speaker-diarization-3.1 子文件夹(你已有 blobsrefssnapshots 三个子文件夹)。
  2. 在这三个子文件夹同一层级下,手动创建 snapshots 下的 main 文件夹:

    • 如果 snapshots 下已有 main 文件夹,直接使用;如果没有,创建它。
    • 最终路径应为:
      D:\pyvideotrans\win-pyvideotrans-v4.03-0626\models\models--pyannote--speaker-diarization-3.1\snapshots\main\
  3. 将下载的 5 个文件全部放入 snapshots/main/ 文件夹内。

完成后,该文件夹内容应类似:

snapshots/
  main/
    config.yaml
    params.pt
    pipeline.yaml
    pytorch_model.bin
    README.md

第四步:删除 disable-tqdm.txt(可选)

如果之前创建了 disable-tqdm.txtdisable-tqdm 文件,建议删除它,因为我们已手动放置模型,不再需要绕过下载。

第五步:重启软件并验证

  • 重启软件。
  • 在主界面勾选“识别说话人”,然后在高级选项中确认“说话人分离模型”已选为 pyannote
  • 执行一个短小的测试视频(如 30 秒),观察是否还会报错。

如果仍然报错

  • 检查 token 是否已填写正确,并已接受 pyannote 协议。
  • 或者暂时使用“内置”模型,稳定性更好。

如果还有困难,请告知具体哪一步遇到问题(例如文件下载不了、文件夹路径不对等),我会进一步指导。

pyannote
/
speaker-diarization-3.1

like
2.56k

Follow
pyannote
2.8k
Automatic Speech Recognition
pyannote.audio
pyannote
pyannote-audio-pipeline
audio
voice
speech
speaker
speaker-diarization
speaker-change-detection
voice-activity-detection
overlapped-speech-detection

arxiv:
2111.14448

arxiv:
2012.01477

License:
mit
Model card
Files and versions
xet

speaker-diarization-3.1
10.9 MB
Ctrl+K

2 contributors
hbredin's picture
hbredin
Update README.md
84fd259
verified
about 2 years ago
.github
feat: add sync-to-hub action
over 2 years ago
reproducible_research
feat: initial import
over 2 years ago
.gitattributes
1.52 kB
initial commit
over 2 years ago
README.md
11 kB
Update README.md
about 2 years ago
config.yaml
469 Bytes
feat: initial import
over 2 years ago
handler.py
2.17 kB
feat: preparing for inference endpoint
over 2 years ago
requirements.txt
21 Bytes
feat: preparing for inference endpoint
over 2 years ago,没有啊pytorch_model.bin

抱歉,我之前的指导有误。pyannote/speaker-diarization-3.1 是一个 pipeline,它本身不包含 pytorch_model.bin 这样的单个权重文件。它依赖多个子模型(如 pyannote/segmentationpyannote/embedding 等),这些子模型会在第一次使用时由 pyannote.audio 自动从 Hugging Face 下载到缓存目录。因此,您无法通过手动下载一个文件来解决问题。请按照以下方案操作:方案一(推荐):暂时改用内置说话人分离模型软件内置的说话人分离模型(支持中英文)无需任何网络下载和 token 配置,稳定可靠。操作步骤:打开软件,进入 菜单 → 工具 → 高级选项 → 语音识别参数“说话人分离模型” 切换为 “内置”“ali-cam++”(推荐内置)点击保存,重启后测试。方案二:仍然使用 pyannote 但修复子进程 tqdm 问题由于子进程中 sys.stdout 为 None 导致下载进度条崩溃,这是 Hugging Face 库的已知兼容性问题。您可以尝试以下补救:删除之前创建的 disable-tqdm.txt 文件(如果有)。进入 软件目录/models/,将 models--pyannote--speaker-diarization-3.1 文件夹删除或重命名(让软件重新下载)。确保:在高级选项中填入了有效的 Huggingface Token(不是只接受协议,必须写 token 字符串)。已打开 pyannote/speaker-diarization-3.1 并点击了 “Agree and access repository”。重启软件,勾选识别说话人,再执行一个短视频(例如 10 秒)。如果仍然报错,请在软件根目录下新建一个名为 no_tqdm 的空文件夹(不是文件),然后重启。这会强制禁用 tqdm 的彩色进度条,改用简单文本日志,避免 stdout 问题。如果依然失败,请再次提供 logs/ 下最新的日志文件(复制底部 30 行)以及您的软件版本号,以便进一步分析。总结: 内置模型无需任何网络依赖,可直接使用。pyannote 的下载问题在 Windows 打包版子进程环境下较难绕过,建议等待后续更新修复。

  1. 软件左上角版本号多少?
  2. 建议使用内置built分离即可,这是 pyannote 的onnx版

[DEBUG] 开始说话人分离,使用 pyannote/speaker-diarization-3.1 模型
[ERROR] 说话人分离出错'NoneType' object has no attribute 'write':Traceback (most recent call last):
File "videotrans\process\prepare_audio.py", line 369, in pyannote_speakers
File "videotrans\process\prepare_audio.py", line 333, in _get_diariz
File "pyannote\audio\core\pipeline.py", line 90, in from_pretrained

config_yml = hf_hub_download(

File "huggingface_hub\utils\_validators.py", line 114, in _inner_fn
File "huggingface_hub\file_download.py", line 1010, in hf_hub_download
File "huggingface_hub\file_download.py", line 1171, in _hf_hub_download_to_cache_dir
File "huggingface_hub\file_download.py", line 1738, in _download_to_tmp_and_move
File "huggingface_hub\file_download.py", line 451, in http_get
File "huggingface_hub\utils\tqdm.py", line 299, in _get_progress_bar_context
File "huggingface_hub\utils\tqdm.py", line 225, in init
File "tqdm\asyncio.py", line 24, in init
File "tqdm\std.py"
......
uteError: 'NoneType' object has no attribute 'write'

[DEBUG] [新进程任务 结束:title='Begin separating the speakers:pyannote'],耗时7.010805606842041s
[ERROR] 说话人分离失败,跳过 'NoneType' object has no attribute 'write'Traceback (most recent call last):
File "videotrans\process\prepare_audio.py", line 369, in pyannote_speakers
File "videotrans\process\prepare_audio.py", line 333, in _get_diariz
File "pyannote\audio\core\pipeline.py", line 90, in from_pretrained

config_yml = hf_hub_download(

File "huggingface_hub\utils\_validators.py", line 114, in _inner_fn
File "huggingface_hub\file_download.py", line 1010, in hf_hub_download
File "huggingface_hub\file_download.py", line 1171, in _hf_hub_download_to_cache_dir
File "huggingface_hub\file_download.py", line 1738, in _download_to_tmp_and_move
File "huggingface_hub\file_download.py", line 451, in http_get
File "huggingface_hub\utils\tqdm.py", line 299, in _get_progress_bar_context
File "huggingface_hub\utils\tqdm.py", line 225, in init
File "tqdm\asyncio.py", line 24, in init
File "tqdm\std.py", line 1098, in init
File "tqdm\std.py", line 1347, in refresh
File "tqdm\std.py", line 1495, in display
File "tqdm\std.py", line 459, in print_status
File "tqdm\std.py", line 452, in fp_write
File "tqdm\utils.py", line 140, in getattr
AttributeError: 'NoneType' object has no attribute 'write'
Traceback (most recent call last):
File "videotrans\task\trans_create.py", line 575, in diariz
File "videotrans\configure\base.py", line 272, in _new_process
videotrans.configure.excepts.VideoTransError: 'NoneType' object has no attribute 'write'Traceback (most recent call last):
File "videotrans\process\prepare_audio.py", line 369, in pyannote_speakers
File "videotrans\process\prepare_audio.py", line 333, in _get_diariz
File "pyannote\audio\core\pipeline.py", line 90, in from_pretrained

config_yml = hf_hub_download(

File "huggingface_hub\utils\_validators.py", line 114, in _inner_fn
File "huggingface_hub\file_download.py", line 1010, in hf_hub_download
File "huggingface_hub\file_download.py", line 1171, in _hf_hub_download_to_cache_dir
File "huggingface_hub\file_download.py", line 1738, in _download_to_tmp_and_move
File "huggingface_hub\file_download.py", line 451, in http_get
File "huggingface_hub\utils\tqdm.py", line 299, in _get_progress_bar_context
File "huggingface_hub\utils\tqdm.py", line 225, in init
File "tqdm\asyncio.py", line 24, in init
File "tqdm\std.py", line 1098, in init
File "tqdm\std.py", line 1347, in refresh
File "tqdm\std.py", line 1495, in display
File "tqdm\std.py", line 459, in print_status
File "tqdm\std.py", line 452, in fp_write
File "tqdm\utils.py", line 140, in getattr
AttributeError: 'NoneType' object has no attribute 'write'

;另外我还有个需求我希望能够再多加几个角色的声音当然edge本身只有那么多角色但我希望能够自己进行音调的修改或者说语速的修改然后自己去增加说话的音色我希望能增加个这个功能

根据 [开发者回复] 的明确指示:建议使用内置 built 说话人分离模型,这是 pyannote 的 onnx 版,无需额外下载和网络配置。请按以下步骤操作:

  1. 打开软件,进入 菜单 → 工具 → 高级选项 → 语音识别参数
  2. 说话人分离模型 切换为 内置(或 ali-cam++
  3. 点击保存,重启软件后即可稳定使用说话人识别。

pyannote 的下载问题在当前版本中属于已知的子进程兼容性限制,后续更新会修复,请暂时回避。


关于您提出的增加更多配音角色(音调、语速修改,增加音色)的功能需求:
目前软件已支持对配音的音调和语速进行修改(位于主界面的 设置更多参数...配音语速音调+)。
但如果您希望增加全新的预设音色,当前版本没有“自定义预设音色库”这类编辑功能。不过您可以利用以下方案间接实现:

  • 使用支持声音克隆的 TTS 渠道(如 Qwen-TTS、GPT-SoVITS、F5-TTS、CosyVoice 等),通过上传 5-10 秒的参考音频(wav)来生成任意音色的配音。
  • 具体操作:将您的 wav 音频文件放到 软件目录/f5-tts/ 下,然后在 菜单 → TTS 设置 → 设置参考音频 中绑定该文件,之后在主界面配音角色下拉框中即可选择该音频对应的音色。
  • 大部分本地 TTS 渠道还允许您调整参考音频的语速、音调参数,从而衍生出更多声音变体。

如果您希望软件未来内置一个“音色编辑器/预设管理器”,建议将需求反馈给开发者,不过目前没有这个功能。

如果还有疑问,请提供软件左上角版本号,以及您希望达到的具体效果(例如:想增加一个“低沉男声”的固定选项),我可以进一步帮您规划配置方案。

"D:\pyvideotrans\win-pyvideotrans-v4.03-0626\no_tqdm"这是放在根目录了么

是的,路径正确。D:\pyvideotrans\win-pyvideotrans-v4.03-0626\no_tqdm 这个空文件夹已经放在软件根目录(即 sp.exe 所在位置)下。

但请注意,根据 [开发者回复] 中的明确指示,建议使用内置说话人分离模型,这是当前最稳定可靠的方案(pyannote 的 onnx 内置版)。禁用 tqdm 的规避手段不一定能彻底解决 pyannote 的子进程兼容性问题,且可能带来其他未知错误。

如果仍想尝试 pyannote,请确保:

  • 已删除之前创建的 disable-tqdm.txt 文件(如果有)。
  • 清空或删除 models/models--pyannote--speaker-diarization-3.1/ 文件夹(让软件重新下载)。
  • 在高级选项中正确填写 Huggingface Token。
  • 重启软件后再试一个短视频。

如果仍然失败,请直接切换到 内置 模型,无需任何额外配置。

pyannote 是私有模型,需要登录 huggingface.co 同意 pyannote 的使用协议,然后再获取 access_token,并将它填写到高级选项的 hf_token 里,才能下载使用。

DEBUG] LLM Re-segmenting:self.ainame='deepseek',kwargs={'model': 'deepseek-v4-pro', 'temperature': 0.1, 'timeout': 300, 'reasoning_effort': 'high', 'max_tokens': 163940}
[DEBUG] LLM断句:self.ainame='deepseek',model_name='deepseek-v4-pro',api_url='https://api.deepseek.com/v1/'
[INFO] Starting call to 'videotrans.translator._openaicompat.OpenAICampat.llm_segment.._send', this is the 1st time calling it.
[INFO] Starting call to 'videotrans.translator._openaicompat.OpenAICampat.llm_segment.._send', this is the 1st time calling it.
[INFO] Starting call to 'videotrans.translator._openaicompat.OpenAICampat.llm_segment.._send', this is the 1st time calling it.
[INFO] Starting call to 'videotrans.translator._openaicompat.OpenAICampat.llm_segment.._send', this is the 1st time calling it.
[DEBUG] LLM重新断句完成,原始字幕行:132, 新字幕行:342, 用时:1050.359414100647s

根据 [开发者回复],pyannote 的使用必须满足两个前提条件:

  1. 必须登录 huggingface.co 并同意 pyannote/speaker-diarization-3.1 的用户协议(点击 "Agree and access repository")。
  2. 必须获取你的 Huggingface Access Token(创建地址),并将该 token 字符串填写到软件 菜单 → 工具 → 高级选项 → 语音识别参数 → Huggingface的token 输入框中。

请检查并确保:

  • 你已 在网页上同意见用户协议将 token 填入软件设置(缺一不可)。
  • 如果仍无法下载,说明 token 可能无效或未正确接受协议。

建议:
由于 pyannote 配置繁琐且容易出错,强烈建议直接使用内置说话人分离模型(见 [开发者回复])。内置模型是 pyannote 的 onnx 版,无需 token、无需网络、无需任何配置,效果稳定,完全满足中文/英文的说话人识别需求。


关于您日志中 LLM 重新断句的输出:

LLM重新断句完成,原始字幕行:132, 新字幕行:342, 用时:1050.359414100647s

这属于正常行为。LLM 重新断句会将长句按语义切分为更短、更自然的字幕行,因此行数从 132 条变为 342 条是预期结果。耗时约 1050 秒(约 17.5 分钟)是由于 DeepSeek 的 deepseek-v4-pro 模型处理 132 行字幕的推理时间。如果您觉得耗时太长,可以在高级选项中减小 LLM重新断句每批字幕行数

注意: 当使用 clone 配音角色时,请务必禁用 LLM 重新断句,否则会导致参考音频错位,克隆效果极差。

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: ko-fi.com/jianchang512

Related resource