Merge pull request #530 from pipecat-ai/khk/tts-say-fix

fix for multi-sentence tts say utterances
This commit is contained in:
Kwindla Hultman Kramer
2024-09-30 20:59:53 -07:00
committed by GitHub

View File

@@ -260,7 +260,10 @@ class TTSService(AIService):
self._stop_frame_task = None
async def say(self, text: str):
aggregate_sentences = self._aggregate_sentences
self._aggregate_sentences = False
await self.process_frame(TextFrame(text=text), FrameDirection.DOWNSTREAM)
self._aggregate_sentences = aggregate_sentences
await self.flush_audio()
async def process_frame(self, frame: Frame, direction: FrameDirection):