apply._diarize() does not allow for specification of Hugging Face token
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
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.
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!