Skip to content

Commit

Permalink
Merge pull request #4 from M-Rochat/master
Browse files Browse the repository at this point in the history
Fix compatibility issue for new version of pyannote
  • Loading branch information
GuillaumeRochette authored Apr 21, 2024
2 parents 392b437 + 248401c commit 7289e2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 7289e2e

Please sign in to comment.