omi icon indicating copy to clipboard operation
omi copied to clipboard

Python SDK Deepgram cancel closes without CloseStream

Open Da7em-T opened this issue 2 months ago • 0 comments

On current main, cancelling DeepgramTranscriber.run() in sdks/python/omi/stt/deepgram.py tears down the websockets connection and never sends Deepgram's CloseStream frame ({"type":"CloseStream"}). Remaining transcription results can be dropped. Go counterpart: #13023. React Native: #13621. TypeScript device SDK: #13623. Dart device SDK: #13625.

The Python client has no stop() method; caller cancellation is the shutdown path. Server EOF still reconnects and must not send CloseStream.

Reproduction with a patched websockets.connect fake (no live Deepgram, credentials, or audio): cancelling run() closed the socket with no CloseStream text frame.

Da7em-T avatar Sep 12 '26 13:09 Da7em-T