Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/pipecat/services/tts_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,10 @@ async def process_frame(self, frame: Frame, direction: FrameDirection):
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:
Comment on lines +367 to +370
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aconchillo , @markbackman , I believe we should investigate if this is the right fix or not for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we are happy with the fix, we can restore the changes from this PR.

await self.push_frame(frame, direction)
else:
await self.push_frame(frame, direction)
Expand Down