From b9390ccb1b5593d71e6e92e30a50d73f9e00ada7 Mon Sep 17 00:00:00 2001 From: Luke Payyapilli Date: Mon, 26 Jan 2026 10:08:17 -0500 Subject: [PATCH] Address review: remove UserStartedSpeakingFrame, add explanatory comment --- changelog/3429.added.md | 2 +- src/pipecat/services/google/gemini_live/llm.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/changelog/3429.added.md b/changelog/3429.added.md index 1ba0279d7..905dcac78 100644 --- a/changelog/3429.added.md +++ b/changelog/3429.added.md @@ -1 +1 @@ -- Added handling for `server_content.interrupted` signal in Gemini Live services for faster interruption response. +- Added handling for `server_content.interrupted` signal in the Gemini Live service for faster interruption response in the case where there isn't already turn tracking in the pipeline, e.g. local VAD + context aggregators. When there is already turn tracking in the pipeline, the additional interruption does no harm. diff --git a/src/pipecat/services/google/gemini_live/llm.py b/src/pipecat/services/google/gemini_live/llm.py index 7a6f55f83..895489955 100644 --- a/src/pipecat/services/google/gemini_live/llm.py +++ b/src/pipecat/services/google/gemini_live/llm.py @@ -1199,8 +1199,17 @@ class GeminiLiveLLMService(LLMService): self._check_and_reset_failure_counter() if message.server_content and message.server_content.interrupted: + # NOTE: while the service triggers interruptions in + # the specific case of barge-ins, it does *not* + # emit UserStarted/StoppedSpeakingFrames, as the + # Gemini Live API does not give us broadly reliable + # signals to base those off of. Pipelines that + # require turn tracking (like those using context + # aggregators) still need an independent way to + # track turns, such as local Silero VAD in + # combination with the context aggregator default + # turn strategies. logger.debug("Gemini VAD: interrupted signal received") - await self.broadcast_frame(UserStartedSpeakingFrame()) await self.push_interruption_task_frame_and_wait() elif message.server_content and message.server_content.model_turn: await self._handle_msg_model_turn(message)