diff --git a/deepgram/transcription.py b/deepgram/transcription.py index 7f641502..0b626a73 100644 --- a/deepgram/transcription.py +++ b/deepgram/transcription.py @@ -312,6 +312,10 @@ def configure(self, config: ToggleConfigOptions) -> None: "processors": config }))) + def keep_alive(self) -> None: + """Keeps the connection open when no audio data is being sent.""" + self._queue.put_nowait((False, json.dumps({"type": "KeepAlive"}))) + async def finish(self) -> None: """Closes the connection to the Deepgram endpoint, waiting until ASR is complete on all submitted data."""