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.