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

Fix compatibility issue for new version of pyannote #4

Merged
merged 1 commit into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions psifx/audio/diarization/pyannote/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def setup(parser: argparse.ArgumentParser):
parser.add_argument(
"--model_name",
type=str,
default="2.1.1",
help="version number of the pyannote/speaker-diarization model, c.f."
default="pyannote/speaker-diarization@2.1.1",
help="name of the diarization model used, c.f."
" https://huggingface.co/pyannote/speaker-diarization/tree/main/reproducible_research",
)
parser.add_argument(
Expand Down
4 changes: 2 additions & 2 deletions psifx/audio/diarization/pyannote/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PyannoteDiarizationTool(DiarizationTool):

def __init__(
self,
model_name: str = "2.1.1",
model_name: str = "pyannote/speaker-diarization@2.1.1",
api_token: Optional[str] = None,
device: str = "cpu",
overwrite: bool = False,
Expand All @@ -34,7 +34,7 @@ def __init__(
self.api_token = api_token

self.model: Pipeline = Pipeline.from_pretrained(
checkpoint_path=f"pyannote/speaker-diarization@{model_name}",
checkpoint_path=model_name,
use_auth_token=api_token,
).to(device=torch.device(device))

Expand Down