CouncilDataProject / CouncilDataProject/speakerbox

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

Open
#26 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
61
Forks
6
PR merge metrics
No merged PRs in 30d

Description

### Describe the Bug

The `apply()` function fails as a Hugging Face token is not supplied. The contained [`_diarize()` function calls](https://github.com/CouncilDataProject/speakerbox/blob/e9f1f4efd0199a5c0266873c345d11aa13d72ec8/speakerbox/main.py#L363):

```bash
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()`](https://github.com/CouncilDataProject/speakerbox/blob/e9f1f4efd0199a5c0266873c345d11aa13d72ec8/speakerbox/preprocess.py#L108).

### 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.