From 82a9d7f9921b87f8111d5e23de68ec8a9ac0c323 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Wed, 30 Apr 2025 16:24:04 -0400 Subject: [PATCH] Gemini Mulitmodal Live to push TTSTextFrame only --- src/pipecat/processors/aggregators/llm_response.py | 5 ++--- src/pipecat/services/gemini_multimodal_live/gemini.py | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/pipecat/processors/aggregators/llm_response.py b/src/pipecat/processors/aggregators/llm_response.py index 5d8b6a32c..fa163ac0a 100644 --- a/src/pipecat/processors/aggregators/llm_response.py +++ b/src/pipecat/processors/aggregators/llm_response.py @@ -36,7 +36,6 @@ from pipecat.frames.frames import ( StartInterruptionFrame, TextFrame, TranscriptionFrame, - TTSTextFrame, UserImageRawFrame, UserStartedSpeakingFrame, UserStoppedSpeakingFrame, @@ -494,7 +493,7 @@ class LLMAssistantContextAggregator(LLMContextResponseAggregator): await self._handle_llm_start(frame) elif isinstance(frame, LLMFullResponseEndFrame): await self._handle_llm_end(frame) - elif isinstance(frame, TTSTextFrame): + elif isinstance(frame, TextFrame): await self._handle_text(frame) elif isinstance(frame, LLMMessagesAppendFrame): self.add_messages(frame.messages) @@ -621,7 +620,7 @@ class LLMAssistantContextAggregator(LLMContextResponseAggregator): self._started -= 1 await self.push_aggregation() - async def _handle_text(self, frame: TTSTextFrame): + async def _handle_text(self, frame: TextFrame): if not self._started: return diff --git a/src/pipecat/services/gemini_multimodal_live/gemini.py b/src/pipecat/services/gemini_multimodal_live/gemini.py index 79cc556f5..b5b650ef5 100644 --- a/src/pipecat/services/gemini_multimodal_live/gemini.py +++ b/src/pipecat/services/gemini_multimodal_live/gemini.py @@ -30,7 +30,6 @@ from pipecat.frames.frames import ( LLMFullResponseStartFrame, LLMMessagesAppendFrame, LLMSetToolsFrame, - LLMTextFrame, LLMUpdateSettingsFrame, StartFrame, StartInterruptionFrame, @@ -892,7 +891,6 @@ class GeminiMultimodalLiveLLMService(LLMService): if not text: return - await self.push_frame(LLMTextFrame(text=text)) await self.push_frame(TTSTextFrame(text=text)) def create_context_aggregator(