deepgram / deepgram-dotnet-sdk

.NET SDK for Deepgram's automated speech recognition APIs.
https://developers.deepgram.com
MIT License
30 stars 31 forks source link

Implement Flush Feature #250

Closed dvonthenen closed 3 months ago

dvonthenen commented 6 months ago

Proposed changes

You don't need to wait for this to be implemented in the SDK. You can use this right now. You can send the following message in the send() function:

{ "type": "Finalize" }

Context

Possible Implementation

Other information

tomkail commented 4 months ago

For others who stumble on this, here's some code and how you might use it:

Our use case is this:

I've implemented Flush like this:

byte[] byteArray = Encoding.UTF8.GetBytes("{ \"type\": \"Finalize\" }\n");
            deepgramLive.SendMessage(byteArray);
dvonthenen commented 3 months ago

Will be available in the 4.1 release.