From b4326b253ff8eac2978a0d112e0a60b61b729972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Tue, 11 Feb 2025 23:36:08 -0800 Subject: [PATCH] CartesiaTTSService: reset context id when flushing audio --- CHANGELOG.md | 3 +++ src/pipecat/services/cartesia.py | 1 + 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 217474f5f..38683ec4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed a `CartesiaTTSService` issue that could cause audio overlapping in some + cases. + - Fixed an issue that was causing `AudioBufferProcessor` to not record synchronized audio. diff --git a/src/pipecat/services/cartesia.py b/src/pipecat/services/cartesia.py index d5ea46a30..3a0f9936e 100644 --- a/src/pipecat/services/cartesia.py +++ b/src/pipecat/services/cartesia.py @@ -239,6 +239,7 @@ class CartesiaTTSService(WordTTSService, WebsocketService): logger.trace(f"{self}: flushing audio") msg = self._build_msg(text="", continue_transcript=False) await self._websocket.send(msg) + self._context_id = None async def _receive_messages(self): async for message in self._get_websocket():