deepgram-dotnet-sdk icon indicating copy to clipboard operation
deepgram-dotnet-sdk copied to clipboard

No way to force an audio flush before sending the Finalize command.

Open QuinnDamerell opened this issue 10 months ago • 0 comments

What is the current behavior?

There's no way to flush the audio buffer in the send channel. The Finalize command uses the Send Immendaty function, which could allow the Finalize command to be sent before the buffered audio is sent.

Steps to reproduce

Use the Send function to send audio. Use the SendFinalize.

Expected behavior

There are a few fixes:

  1. Make the SendFinalize async block until the send queue is empty (doesn't seem ideal)
  2. Add a flush function that allows the client to async block until the send queue is empty.
  3. Make the SendFinalize use the buffered send system, so it's always sent after any buffered audio.

Please tell us about your environment

I'm using the latest dotnet on Linux.

Other information

QuinnDamerell avatar Dec 28 '24 17:12 QuinnDamerell