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

apply._diarize() does not allow for specification of Hugging Face token #26

Open
gregoryfoster opened this issue Nov 17, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@gregoryfoster
Copy link

Describe the Bug

The apply() function fails as a Hugging Face token is not supplied. The contained _diarize() function calls:

diarization_pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization")

This results in an error indicating the pipeline is private/gated.

Expected Behavior

The HUGGINGFACE_TOKEN environment variable is not utilized as it is in preprocess.diarize_and_split_audio().

Reproduction

pipenv install speakerbox=1.2.0
Executive script which calls apply() function with a trained model.

Environment

  • OS Version: macOS 13.4
  • Python: 3.10.13
  • speakerbox Version: 1.2.0
@gregoryfoster gregoryfoster added the bug Something isn't working label Nov 17, 2023
@gregoryfoster
Copy link
Author

I'd be happy to submit a pull request which replicates usage of the HUGGINGFACE_TOKEN environment variable and optionally allows for provision of hf_token directly to the apply() function, but could use some guidance on where you'd like to centralize that environment variable handling code so it's not repeated.

@evamaxfield
Copy link
Member

Hey @gregoryfoster ! Sorry for the delay.

Dangit, sorry you are having so much trouble getting this up and running, seems like I really let this project get to a point of low sustainability.

If you made a pull request that placed a function in the utils.py file link, that centralized the hf_token handling code, I would gladly accept it!

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

No branches or pull requests

2 participants