Merge pull request #3394 from pipecat-ai/aleix/base-smart-turn-update-vad-start-secs

smartturn: rename on_vad_start_secs_updated to update_vad_start_secs
This commit is contained in:
Aleix Conchillo Flaqué
2026-01-09 09:40:29 -08:00
committed by GitHub
3 changed files with 4 additions and 4 deletions

View File

@@ -116,8 +116,8 @@ class BaseTurnAnalyzer(ABC):
"""
pass
def on_vad_start_secs_updated(self, vad_start_secs: float):
"""Invoked when the VAD start trigger time is updated.
def update_vad_start_secs(self, vad_start_secs: float):
"""Update the VAD start trigger time.
The turn analyzer may choose to change its buffer size depending
on this value.

View File

@@ -162,7 +162,7 @@ class BaseSmartTurn(BaseTurnAnalyzer):
logger.debug(f"End of Turn result: {state}")
return state, result
def on_vad_start_secs_updated(self, vad_start_secs: float):
def update_vad_start_secs(self, vad_start_secs: float):
"""Store the new vad_start_secs value."""
self._vad_start_secs = vad_start_secs

View File

@@ -114,7 +114,7 @@ class TurnAnalyzerUserTurnStopStrategy(BaseUserTurnStopStrategy):
audio collected during that confirmation window, so we let the analyzer know
when this value has changed.
"""
self._turn_analyzer.on_vad_start_secs_updated(frame.vad_params.start_secs)
self._turn_analyzer.update_vad_start_secs(frame.vad_params.start_secs)
async def _handle_input_audio(self, frame: InputAudioRawFrame):
"""Handle input audio to check if the turn is completed."""