#Live Transcription Go sdk errors on sending close message to websocket connection

1 messages · Page 1 of 1 (latest)

marsh mesa
#

Recently upgraded deepgram-go-sdk to v1.3.6 because of panic: repeated read on failed websocket connection on reconnection. Since then I have been getting errors on closing socket connection.
Here's the code for the error handler

func (c DeepgramCallback) Error(r *api.ErrorResponse) error {
    c.log.Errorf("[Error] Received")
    c.log.Errorf("Error.Type: %s", r.Type)
    c.log.Errorf("Error.Message: %s", r.Message)
    c.log.Tracef("Error.Description: %s", r.Description)
    return nil
}

And the logs for errors

[Error] Received
Error.Type: Error
Error.Message: unknown deepgram error unknown deepgram error
Error.Description: read tcp 10.8.5.235:36214->38.142.135.244:443: use of closed network connection
I0709 06:24:40.571493      1 client.go:818] listen: router.Error failed. Err: <nil>
I0709 06:24:40.571511       1 client.go:349] listen: Fatal socket error. Err: read tcp 10.8.5.235:36214->38.142.135.244:443: use of closed network connection

How to handle this?

wooden pollenBOT
#

Thanks for asking your question. Please be sure to reply with as much detail as possible so we can assist you efficiently. Such as:

  • Provide the request_id if you've a question about a transcription response.
  • The options you used or the api.deepgram.com URL you sent your request to, including parameters.
  • Any code snippets you can include.
  • Any audio you can include, or if you can't share it here please email it to us at [email protected] and provide a link to this thread.
marsh mesa
#

Live Transcription Go sdk errors on sending close message to websocket connection

marsh mesa
#

Update getting lot of errors after upgrading the sdk

I0709 10:50:08.637938 1 client.go:191] Context is not valid. Has been canceled.
I0709 10:49:37.868718 1 client.go:377] listen: Deepgram ErrorMsg. Err: websocket: close 1011 (internal server error): Deepgram did not receive audio data or a text message within the timeout window. See https://dpgr.am/net0001
I0709 10:49:37.969338 1 client.go:674] Failed to send CloseNormalClosure. Err: write tcp 10.0.56.41:33044->38.104.135.211:443: write: broken pipe
I0709 10:49:37.868483 1 client.go:561] WriteJSON WriteMessage failed. Err: write tcp 10.0.56.41:33044->38.104.135.211:443: write: broken pipe

Deepgram Docs

Learn how to debug common real-time, live streaming transcription errors.

limpid plaza
#

I just replied to you DMs. Basically the error is that you cannot reuse the context object once the connection has been cancelled or stopped. you need to reconnect using a new context object.

#

if you have some code for me to look at specifically around any calls to canceling the context or calling Stop(), I can help with the reconnect logic