From 408270b6477497d26c7969bdf10d68da0057e5fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Mon, 24 Feb 2025 14:37:37 -0800 Subject: [PATCH] lmnt: don't send "eof" before closing the socket --- src/pipecat/services/lmnt.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pipecat/services/lmnt.py b/src/pipecat/services/lmnt.py index f6010eeb7..dd6b9e3b8 100644 --- a/src/pipecat/services/lmnt.py +++ b/src/pipecat/services/lmnt.py @@ -150,8 +150,9 @@ class LmntTTSService(InterruptibleTTSService): if self._websocket: logger.debug("Disconnecting from LMNT") - # Send EOF message before closing - await self._websocket.send(json.dumps({"eof": True})) + # NOTE(aleix): sending EOF message before closing is causing + # errors on the websocket, so we just skip it for now. + # await self._websocket.send(json.dumps({"eof": True})) await self._websocket.close() self._websocket = None