TTSService should only process LLMTextFrames

This commit is contained in:
Mark Backman
2025-01-16 10:03:24 -05:00
parent b8ffd7b16b
commit 67e47a388d

View File

@@ -20,12 +20,12 @@ from pipecat.frames.frames import (
ErrorFrame,
Frame,
LLMFullResponseEndFrame,
LLMTextFrame,
StartFrame,
StartInterruptionFrame,
STTMuteFrame,
STTUpdateSettingsFrame,
TextFrame,
TranscriptionFrame,
TTSAudioRawFrame,
TTSSpeakFrame,
TTSStartedFrame,
@@ -291,8 +291,7 @@ class TTSService(AIService):
async def process_frame(self, frame: Frame, direction: FrameDirection):
await super().process_frame(frame, direction)
if isinstance(frame, TextFrame) and not isinstance(frame, TranscriptionFrame):
if isinstance(frame, LLMTextFrame):
await self._process_text_frame(frame)
elif isinstance(frame, StartInterruptionFrame):
await self._handle_interruption(frame, direction)