diff --git a/src/pipecat/services/deepgram/stt.py b/src/pipecat/services/deepgram/stt.py index 0fb891d61..63e7a05ba 100644 --- a/src/pipecat/services/deepgram/stt.py +++ b/src/pipecat/services/deepgram/stt.py @@ -577,7 +577,11 @@ class DeepgramSTTService(STTService): Frame: None (transcription results come via WebSocket callbacks). """ if self._connection: - await self._connection.send_media(audio) + try: + await self._connection.send_media(audio) + except Exception as e: + logger.warning(f"{self}: send_media failed, connection will reconnect: {e}") + self._connection = None yield None def _build_connect_kwargs(self) -> dict: