deepgram/deepgram-dotnet-sdk

Live transcription silence is being treated as an error

Closed this issue · 3 comments

What is the current behavior?

Once I establish a connection, if I'm not sending audio in the next 20-30 seconds, I receive this message:

Deepgram did not provide a response message within the timeout window. See https://dpgr.am/net0000

Steps to reproduce

Connect but don't send bytes and wait (with the keep alive working)

Expected behavior

I would expect the connection to stay open as long as I call keep alive, so I can start sending bytes when the user speaks without having to connect, OR for the reconnection and keep-alive logic to be handled internally by the library.

Please tell us about your environment

  • Windows 10
  • C#

Other information

I wan't sure if this is a bug or a feature, but since the documentation for net0000 doesn't say much about this situation, and there's already a keepalive to ensure continued connections, this behavior seemed surprising to me.

I guess the follow up question would be, if this is by design, what should be the best practice? Parse the error for "net0000" and reconnect automatically? Or should I do audio processing to ensure there is relevant data beforehand?

If we need to reconnect only when hearing audio, that means I need to buffer audio until the connection is successful rather than streaming them, so for the record I'm not a fan of this option :)

Related to #131
This will be fixed by #132

Fixed in #132