Ensure to push LLMFullResponseEndFrame if the sentence is empty.
This commit is contained in:
@@ -364,7 +364,10 @@ class TTSService(AIService):
|
|||||||
sentence, includes_inter_frame_spaces=includes_inter_frame_spaces
|
sentence, includes_inter_frame_spaces=includes_inter_frame_spaces
|
||||||
)
|
)
|
||||||
if isinstance(frame, LLMFullResponseEndFrame):
|
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)
|
await self.push_frame(frame, direction)
|
||||||
else:
|
else:
|
||||||
await self.push_frame(frame, direction)
|
await self.push_frame(frame, direction)
|
||||||
|
|||||||
Reference in New Issue
Block a user