You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

持有读权限访问令牌仍无法下载pyannote/speaker-diarization管道求助

解决pyannote/speaker-diarization管道下载失败问题

你遇到的错误信息如下:

Could not download 'pyannote/speaker-diarization' pipeline.
It might be because the pipeline is private or gated so make
sure to authenticate. Visit https://hf.co/settings/tokens to
create your access token and retry with:

   >>> Pipeline.from_pretrained('pyannote/speaker-diarization',
   ...                          use_auth_token='hf...')

你的代码示例:

from pyannote.audio import Pipeline

pipeline = Pipeline.from_pretrained(
    'pyannote/speaker-diarization',
    use_auth_token='YOUR_ACCESS_TOKEN'
)

以下是具体解决步骤:

  • 申请模型访问权限:pyannote/speaker-diarization是 gated模型,仅靠读权限令牌还不够,你需要前往该模型的Hugging Face主页,点击"Access repository"按钮,填写申请信息并同意使用条款,等待审核通过(通常几分钟内就能完成)。
  • 验证令牌有效性:确保使用的是未过期的read权限令牌,复制令牌时不要包含多余的空格或特殊字符,代码里要替换成实际的令牌字符串(比如use_auth_token='hf_xxxxxxxxx')。
  • 更新依赖版本:在Colab中运行!pip install -U pyannote.audio,确保pyannote.audio是最新版本,同时保证torch、transformers等依赖库版本兼容。
  • 手动完成HF认证:可以在Colab中先执行!huggingface-cli login,输入你的令牌完成认证,后续调用Pipeline.from_pretrained时可以省略use_auth_token参数,避免参数传递错误。

内容的提问来源于stack exchange,提问作者k06ynzea0w_plancetose.com

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.20 06:25:10