Merge branch 'release/4.0.1'

This commit is contained in:
Hervé BREDIN committed 2025-10-10 14:24:18 +02:00
commit f8efe0ac5c
4 files changed
+27 -7

No files matched your search

+7
View File
@@ -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
+4 -4
View File
@@ -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]
@@ -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)
+9 -3
View File
@@ -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(