deepgram-dotnet-sdk
deepgram-dotnet-sdk copied to clipboard
No way to force an audio flush before sending the Finalize command.
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:
- Make the SendFinalize async block until the send queue is empty (doesn't seem ideal)
- Add a flush function that allows the client to async block until the send queue is empty.
- 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.