fix(react-native): send Deepgram CloseStream before closing Stop

Merged
DA
3mo ago
+77-2

Fixes #13621.

createDeepgramTranscriber().stop() closed the WebSocket without sending Deepgram's CloseStream frame. Remaining transcription results can be dropped. Send {"type":"CloseStream"} while the socket is open, then close. Related Go device SDK issue: #13023.

Validation

  • Reproduced on origin/main d5cbd548f6: injected socket recorded close() and no text frame.
  • After the fix, Node 22 recorded {"type":"CloseStream"} then close(). No live Deepgram, credentials, or audio.

AI-assisted contribution. Bounty eligibility remains a maintainer decision.

Made with Cursor