Close
Close will close the websocket connection immediately.
To close the websocket connection, you can either send an websocket Close frame, or send the optional close message.
CloseTo send the Close message, you need to send the following JSON message to the server:
Close ConfirmationUpon receiving the Close message, the server will close the websocket connect and return:
In real-time text-to-speech processing, situations may arise where you need to immediately stop the server’s operations. To manage this, Deepgram provides a Close message, which ensures the server halts processing and closes the connection promptly, maintaining control and responsiveness in critical scenarios.