Skip to content

Commit

Permalink
add more missing keyword-only arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
aconchillo committed Jul 1, 2024
1 parent d7d4691 commit c5298f7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pipecat/pipeline/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)}"

Expand Down
4 changes: 2 additions & 2 deletions src/pipecat/transports/services/daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions src/pipecat/vad/silero.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class SileroVADAnalyzer(VADAnalyzer):

def __init__(
self,
*,
sample_rate: int = 16000,
version: str = "v5.0",
params: VADParams = VADParams()):
Expand Down Expand Up @@ -87,6 +88,7 @@ class SileroVAD(FrameProcessor):

def __init__(
self,
*,
sample_rate: int = 16000,
version: str = "v5.0",
vad_params: VADParams = VADParams(),
Expand Down
2 changes: 1 addition & 1 deletion src/pipecat/vad/vad_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c5298f7

Please sign in to comment.