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 default path to pyannote model with fallback option. #71

Merged
merged 4 commits into from
Apr 29, 2024

Conversation

mahenning
Copy link
Collaborator

Checks if it can load from jaikinator hf repo. If not, fall back to normal default options.

@mahenning mahenning requested a review from JSchmie April 19, 2024 15:39
@mahenning mahenning self-assigned this Apr 19, 2024
Copy link
Owner

@JSchmie JSchmie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe clean up the function a bit more.

scraibe/diarisation.py Outdated Show resolved Hide resolved
scraibe/diarisation.py Show resolved Hide resolved
scraibe/diarisation.py Outdated Show resolved Hide resolved
scraibe/diarisation.py Outdated Show resolved Hide resolved
scraibe/diarisation.py Outdated Show resolved Hide resolved
scraibe/diarisation.py Outdated Show resolved Hide resolved
scraibe/diarisation.py Outdated Show resolved Hide resolved
scraibe/diarisation.py Outdated Show resolved Hide resolved
Copy link
Owner

@JSchmie JSchmie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a minimal code example for the HFApi and how you parse a tuple there?

scraibe/diarisation.py Outdated Show resolved Hide resolved
scraibe/diarisation.py Show resolved Hide resolved
scraibe/diarisation.py Show resolved Hide resolved
scraibe/diarisation.py Show resolved Hide resolved
scraibe/misc.py Show resolved Hide resolved
@mahenning
Copy link
Collaborator Author

Diariser.load_model() -> pyannote model from jaikinator/scraibe, if that repo is not available, try to set/load a HF token and load from pyannote/speaker-diarization-3.1. (Technically, try first to load a yaml file from ~/.cache/torch/pyannote, but this is mostly irrelevant.)
Diariser.load_model('path/to/yaml.yaml') -> try to load a yaml file locally, if it is not found, throw error.
Diariser.load_model('hfrepo/model) -> interprets every string as a os path, if it's not existing, throw error.

@JSchmie JSchmie merged commit 37e28c5 into develop Apr 29, 2024
3 checks passed
@JSchmie JSchmie deleted the develop_hf_wrapper branch May 31, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants