Gemini Mulitmodal Live to push TTSTextFrame only

This commit is contained in:
Mark Backman
2025-04-30 16:24:04 -04:00
parent facbebb15f
commit 82a9d7f992
2 changed files with 2 additions and 5 deletions

View File

@@ -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

View File

@@ -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(