From c5298f78cba98d1f58f85beafc1fa107428796fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Mon, 1 Jul 2024 12:33:42 -0700 Subject: [PATCH] add more missing keyword-only arguments --- src/pipecat/pipeline/runner.py | 2 +- src/pipecat/transports/services/daily.py | 4 ++-- src/pipecat/vad/silero.py | 2 ++ src/pipecat/vad/vad_analyzer.py | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pipecat/pipeline/runner.py b/src/pipecat/pipeline/runner.py index df480648e..3237c3904 100644 --- a/src/pipecat/pipeline/runner.py +++ b/src/pipecat/pipeline/runner.py @@ -15,7 +15,7 @@ class PipelineRunner: - def __init__(self, name: str | None = None, handle_sigint: bool = True): + def __init__(self, *, name: str | None = None, handle_sigint: bool = True): self.id: int = obj_id() self.name: str = name or f"{self.__class__.__name__}#{obj_count(self)}" diff --git a/src/pipecat/transports/services/daily.py b/src/pipecat/transports/services/daily.py index 94ff27ff6..c85e989dd 100644 --- a/src/pipecat/transports/services/daily.py +++ b/src/pipecat/transports/services/daily.py @@ -59,8 +59,8 @@ class DailyTransportMessageFrame(TransportMessageFrame): class WebRTCVADAnalyzer(VADAnalyzer): - def __init__(self, sample_rate=16000, num_channels=1, params: VADParams = VADParams()): - super().__init__(sample_rate, num_channels, params) + def __init__(self, *, sample_rate=16000, num_channels=1, params: VADParams = VADParams()): + super().__init__(sample_rate=sample_rate, num_channels=num_channels, params=params) self._webrtc_vad = Daily.create_native_vad( reset_period_ms=VAD_RESET_PERIOD_MS, diff --git a/src/pipecat/vad/silero.py b/src/pipecat/vad/silero.py index de64eb4df..1cf173ef8 100644 --- a/src/pipecat/vad/silero.py +++ b/src/pipecat/vad/silero.py @@ -35,6 +35,7 @@ class SileroVADAnalyzer(VADAnalyzer): def __init__( self, + *, sample_rate: int = 16000, version: str = "v5.0", params: VADParams = VADParams()): @@ -87,6 +88,7 @@ class SileroVAD(FrameProcessor): def __init__( self, + *, sample_rate: int = 16000, version: str = "v5.0", vad_params: VADParams = VADParams(), diff --git a/src/pipecat/vad/vad_analyzer.py b/src/pipecat/vad/vad_analyzer.py index 067165a8b..f6b9b61a7 100644 --- a/src/pipecat/vad/vad_analyzer.py +++ b/src/pipecat/vad/vad_analyzer.py @@ -28,7 +28,7 @@ class VADParams(BaseModel): class VADAnalyzer: - def __init__(self, sample_rate: int, num_channels: int, params: VADParams): + def __init__(self, *, sample_rate: int, num_channels: int, params: VADParams): self._sample_rate = sample_rate self._num_channels = num_channels self._params = params