Introducing “State of Voice AI 2025”: The Year of Human-like Voice AI Agents

Speech To Text
Oct 17, 2022

New Method for Closing Streams

Deepgram’s real-time API has been updated for enhanced usability.

Streaming connections should now be closed by sending the JSON message { "type": "CloseStream" } . Previously, streaming connections were closed by sending an empty byte.

Here’s an example of sending a CloseStream message in Javascript:

And an example in Python:

In the future, we will deprecate the ability to close the connection with an empty byte.  We recommend customers using our API move to using the CloseStream method to avoid potential disruptions. Any customers using our SDK will not need to make changes.

Unlock Voice AI at Scale with 
an API Call

Get conversational intelligence with transcription and understanding on the world's best speech AI platform.

Sign Up FreeBook a Demo