From 13827e1282b4e0d58c5797c847b8698e6a0f3462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Fri, 19 Jul 2024 16:57:00 -0700 Subject: [PATCH] processors(realtime-ai): send a successful response for every command --- src/pipecat/processors/frameworks/realtimeai.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pipecat/processors/frameworks/realtimeai.py b/src/pipecat/processors/frameworks/realtimeai.py index fdfbd5b47..de87ab136 100644 --- a/src/pipecat/processors/frameworks/realtimeai.py +++ b/src/pipecat/processors/frameworks/realtimeai.py @@ -175,6 +175,9 @@ class RealtimeAIProcessor(FrameProcessor): await self._handle_llm_update_context(message.data.llm) case "tts-speak": await self._handle_tts_speak(message.data.tts) + + # Send a message to indicate we successfully executed the command. + await self._send_response(message.type, True) except ValidationError as e: await self._send_response(message.type, False, f"invalid message: {e}") @@ -219,10 +222,6 @@ class RealtimeAIProcessor(FrameProcessor): # as the initial one. start_frame = dataclasses.replace(self._start_frame) await self.push_frame(start_frame) - - # We now send a message to indicate we successfully initialized - # the pipelines. - await self._send_response("setup", True) except Exception as e: await self._send_response("setup", False, f"unable to create pipeline: {e}")