If Deepgram encounters an error during real-time streaming, we will return a WebSocket Close frame (WebSocket Protocol specification, section 5.5.1.
The body of the Close frame will indicate the reason for closing using one of the specification’s pre-defined status codes followed by a UTF-8-encoded payload that represents the reason for the error. Current codes and payloads in use include:
|1002||DATA-0000||The payload cannot be decoded as audio. It is either not audio data or is a codec unsupported by Deepgram.|
|1011||NET-0000||The service has not transmitted a Text frame to the client within the timeout window. This may indicate an issue internally in Deepgram's systems or could be due to Deepgram not receiving enough audio data to transcribe a frame.|
|1011||NET-0001||The service has not received a Binary frame from the client within the timeout window. This may indicate an internal issue in Deepgram's systems, the client's systems, or the network connecting them.|
After sending a Close message, the endpoint considers the WebSocket connection closed and will close the underlying TCP connection.