fix: DeepgramSTTService await is_connected()

This commit is contained in:
Mark Backman
2025-11-05 21:42:15 -05:00
parent 376dcc34f7
commit c8c13ecee2
2 changed files with 4 additions and 1 deletions

View File

@@ -72,6 +72,9 @@ reason")`.
### Fixed ### Fixed
- Fixed `DeepgramSTTService._disconnect()` to properly await `is_connected()`
method call, which is an async coroutine in the Deepgram SDK.
- Fixed an issue where the `SmallWebRTCRequest` dataclass in runner would scrub - Fixed an issue where the `SmallWebRTCRequest` dataclass in runner would scrub
arbitrary request data from client due to camelCase typing. This fixes data arbitrary request data from client due to camelCase typing. This fixes data
passthrough for JS clients where `APIRequest` is used. passthrough for JS clients where `APIRequest` is used.

View File

@@ -236,7 +236,7 @@ class DeepgramSTTService(STTService):
logger.error(f"{self}: unable to connect to Deepgram") logger.error(f"{self}: unable to connect to Deepgram")
async def _disconnect(self): async def _disconnect(self):
if self._connection.is_connected: if await self._connection.is_connected():
logger.debug("Disconnecting from Deepgram") logger.debug("Disconnecting from Deepgram")
# Deepgram swallows asyncio.CancelledError internally which prevents # Deepgram swallows asyncio.CancelledError internally which prevents
# proper cancellation propagation. This issue was found with # proper cancellation propagation. This issue was found with