From 27bf53c3aa89315d083f483f0015ccd136b7b41f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20BREDIN?= Date: Tue, 4 Feb 2025 23:07:39 +0100 Subject: [PATCH] fix: fix Calibration.from_pretrained support for pathlib.Path --- pyannote/audio/core/calibration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyannote/audio/core/calibration.py b/pyannote/audio/core/calibration.py index eb5f50dc4..d66f562c2 100644 --- a/pyannote/audio/core/calibration.py +++ b/pyannote/audio/core/calibration.py @@ -113,7 +113,7 @@ def from_file(cls, path: str) -> "Calibration": @classmethod def from_pretrained( cls, - checkpoint: str, + checkpoint: Union[Path, str], subfolder: Optional[str] = None, token: Optional[Text] = None, cache_dir: Optional[Union[str, Path]] = None, @@ -138,7 +138,7 @@ def from_pretrained( return cls.from_file(checkpoint) _, _, path = download_from_hf_hub( - checkpoint, + str(checkpoint), AssetFileName.Calibration, subfolder=subfolder, cache_dir=cache_dir,