diff --git a/CHANGELOG.md b/CHANGELOG.md index ffcad5d3..2dbd9a96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG +## Version 4.0.1 (2025-10-10) + +- feat: allow passing preloaded pipeline config to `get_pipeline` +- setup: update `pyannoteai-sdk` dependency to `0.3.0` +- fix: relax version constraint on `OpenTelemetry` dependencies +- improve: warn (instead of raise) when passing unsupported arguments to speaker diarization pipeline + ## Version 4.0.0 (2025-09-29) ### TL;DR diff --git a/pyproject.toml b/pyproject.toml index afb1fbb6..39087f04 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,9 +12,9 @@ dependencies = [ "einops>=0.8.1", "huggingface-hub>=0.28.1", "lightning>=2.4", - "opentelemetry-api==1.34.0", - "opentelemetry-sdk==1.34.0", - "opentelemetry-exporter-otlp==1.34.0", + "opentelemetry-api>=1.34.0", + "opentelemetry-sdk>=1.34.0", + "opentelemetry-exporter-otlp>=1.34.0", "pyannote-core>=6.0.1", "pyannote-database>=6.0.0", "pyannote-metrics>=4.0.0", @@ -29,7 +29,7 @@ dependencies = [ "torchmetrics>=1.6.1", "soundfile>=0.13.1", "matplotlib>=3.10.0", - "pyannoteai-sdk>=0.2.1", + "pyannoteai-sdk>=0.3.0", ] [project.scripts] diff --git a/src/pyannote/audio/pipelines/speaker_diarization.py b/src/pyannote/audio/pipelines/speaker_diarization.py index 3b80033d..e197d031 100644 --- a/src/pyannote/audio/pipelines/speaker_diarization.py +++ b/src/pyannote/audio/pipelines/speaker_diarization.py @@ -534,6 +534,7 @@ class SpeakerDiarization(SpeakerDiarizationMixin, Pipeline): min_speakers: Optional[int] = None, max_speakers: Optional[int] = None, hook: Optional[Callable] = None, + **kwargs, ) -> DiarizeOutput | Annotation: """Apply speaker diarization @@ -561,6 +562,12 @@ class SpeakerDiarization(SpeakerDiarizationMixin, Pipeline): output : DiarizeOutput (or Annotation if `self.legacy` is True) """ + # warn about unsupported kwargs + if len(kwargs) > 0: + warnings.warn( + f"Ignoring unexpected keyword arguments: {', '.join(list(kwargs.keys()))}" + ) + # setup hook (e.g. for debugging purposes) hook = self.setup_hook(file, hook=hook) diff --git a/src/pyannote/audio/pipelines/utils/getter.py b/src/pyannote/audio/pipelines/utils/getter.py index b37c55b5..c9e4d44a 100644 --- a/src/pyannote/audio/pipelines/utils/getter.py +++ b/src/pyannote/audio/pipelines/utils/getter.py @@ -46,9 +46,15 @@ def get_pipeline( _pipeline = Pipeline.from_pretrained(pipeline, token=token, cache_dir=cache_dir) elif isinstance(pipeline, dict): - pipeline.setdefault("token", token) - pipeline.setdefault("cache_dir", cache_dir) - _pipeline = Pipeline.from_pretrained(**pipeline) + if "checkpoint" in pipeline: + pipeline.setdefault("token", token) + pipeline.setdefault("cache_dir", cache_dir) + _pipeline = Pipeline.from_pretrained(**pipeline) + + else: + _pipeline = Pipeline.from_pretrained( + pipeline, token=token, cache_dir=cache_dir + ) else: raise TypeError(