Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add access token parameter for pyannote models #107

Closed
juanmc2005 opened this issue Oct 28, 2022 · 1 comment
Closed

Add access token parameter for pyannote models #107

juanmc2005 opened this issue Oct 28, 2022 · 1 comment
Labels
bug Something isn't working urgent Something requires urgent attention
Milestone

Comments

@juanmc2005
Copy link
Owner

Problem

The new release of pyannote.audio comes with new authentication requirements to download models, so diart users using pyannote models will need to go through this authentication procedure, but diart does not provide a way to download huggingface models with an access token.

Idea

Add a parameter hf_access_token to PipelineConfig and to any pyannote model constructors.

Example

from diart import PipelineConfig, OnlineSpeakerDiarization

config = PipelineConfig(hf_access_token="...")
diarization = OnlineSpeakerDiarization(config)

# or

from diart.models import SegmentationModel, EmbeddingModel

segmentation = SegmentationModel.from_pyannote("pyannote/segmentation", hf_access_token="...")
embedding = EmbeddingModel.from_pyannote("pyannote/embedding", hf_access_token="...")
config = PipelineConfig(segmentation=segmentation, embedding=embedding)
diarization = OnlineSpeakerDiarization(config)

# or

from diart import settings

settings.set_global_hf_access_token("...")
diarization = OnlineSpeakerDiarization()
@juanmc2005 juanmc2005 added the bug Something isn't working label Oct 28, 2022
@juanmc2005 juanmc2005 added this to the Version 0.6 milestone Oct 28, 2022
@juanmc2005 juanmc2005 added the urgent Something requires urgent attention label Oct 28, 2022
@juanmc2005
Copy link
Owner Author

Implemented in #108

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working urgent Something requires urgent attention
Projects
None yet
Development

No branches or pull requests

1 participant