mirror of
https://github.com/pyannote/pyannote-audio.git
synced 2026-11-20 13:07:51 +09:00
improve: warn (instead of raise) on unsupported arguments
This commit is contained in:
1 parent
2594d7d1d6
commit
e528cd4780
2 files changed
+8
No files matched your search
@@ -5,6 +5,7 @@
|
||||
- feat: allow passing preloaded pipeline config to `get_pipeline`
|
||||
- fix: relax version constraint on OpenTelemetry dependencies
|
||||
- setup: update pyannoteai-sdk dependency
|
||||
- improve: warn (instead of raise) when passing unsupported arguments to speaker diarization pipeline
|
||||
|
||||
## Version 4.0.0 (2025-09-29)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user