From 7e41809ec2aaf92167aa6d732330129378fc6dc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Fri, 6 Dec 2024 11:49:03 -0800 Subject: [PATCH] cartesia: fix broken interruptions --- src/pipecat/services/cartesia.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pipecat/services/cartesia.py b/src/pipecat/services/cartesia.py index 5631491fa..a526d7333 100644 --- a/src/pipecat/services/cartesia.py +++ b/src/pipecat/services/cartesia.py @@ -227,7 +227,7 @@ class CartesiaTTSService(WordTTSService): async def _handle_interruption(self, frame: StartInterruptionFrame, direction: FrameDirection): await super()._handle_interruption(frame, direction) await self.stop_all_metrics() - if not self._context_id: + if self._context_id: cancel_msg = json.dumps({"context_id": self._context_id, "cancel": True}) await self._get_websocket().send(cancel_msg) self._context_id = None