From c4f758725ec82e913ab03ffc0a8a056d48a36e22 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Wed, 30 Apr 2025 18:22:43 -0400 Subject: [PATCH] Ignore TranscriptionFrames too --- src/pipecat/services/gemini_multimodal_live/gemini.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pipecat/services/gemini_multimodal_live/gemini.py b/src/pipecat/services/gemini_multimodal_live/gemini.py index 01f55407e..5e6c6ec7c 100644 --- a/src/pipecat/services/gemini_multimodal_live/gemini.py +++ b/src/pipecat/services/gemini_multimodal_live/gemini.py @@ -227,8 +227,10 @@ class GeminiMultimodalLiveAssistantContextAggregator(OpenAIAssistantContextAggre # but the GeminiMultimodalLiveAssistantContextAggregator pushes LLMTextFrames and TTSTextFrames. We # need to override this proces_frame for LLMTextFrame, so that only the TTSTextFrames # are process. This ensures that the context gets only one set of messages. + # GeminiMultimodalLiveLLMService also pushes TranscriptionFrames, so we need to + # ignore pushing those as well, as they're also TextFrames. async def process_frame(self, frame: Frame, direction: FrameDirection): - if not isinstance(frame, LLMTextFrame): + if not isinstance(frame, (LLMTextFrame, TranscriptionFrame)): await super().process_frame(frame, direction) async def handle_user_image_frame(self, frame: UserImageRawFrame):