Compare commits

...

1 Commits

Author SHA1 Message Date
Filipi Fuchter
600cd18cb7 Ensure to push LLMFullResponseEndFrame if the sentence is empty. 2025-11-18 19:50:14 -03:00

View File

@@ -364,7 +364,10 @@ class TTSService(AIService):
sentence, includes_inter_frame_spaces=includes_inter_frame_spaces
)
if isinstance(frame, LLMFullResponseEndFrame):
if self._push_text_frames:
# Ensure the sentence is not empty. In some cases, such as function calling, the
# LLMFullResponseEndFrame may never be pushed into the pipeline, which would
# cause issues if we proceed without "or not sentence" this check.
if self._push_text_frames or not sentence:
await self.push_frame(frame, direction)
else:
await self.push_frame(frame, direction)