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

Add support for Searches in Listen V1 Websocket Channels #323

Closed ElliotEserin closed 2 months ago

ElliotEserin commented 2 months ago

Proposed changes

The Deepgram API supports searches in its live audio transcribing (WebSocket) endpoints, however, the .NET SDK currently only supports this functionality for REST endpoints.

Context

The SDK would better reflect the API and provide supported functionality to the user.

Possible Implementation

It's my understanding that it would be the same as what is currently implemented for the REST model, however I may be wrong on this assumption.

Other information

I would be happy to implement this and create a PR if it would be useful.

dvonthenen commented 2 months ago

Hi @ElliotEserin

Is this what you are looking for? https://github.com/deepgram/deepgram-dotnet-sdk/blob/main/Deepgram/Models/Listen/v1/WebSocket/LiveSchema.cs#L197-L204

ElliotEserin commented 2 months ago

Hi, thanks for the quick reply! Sorry, I wasn't specific enough. Currently it seems like you can provide searches in the LiveSchema, but there isn't currently a way to read the response because searches aren't included in the channel record https://github.com/deepgram/deepgram-dotnet-sdk/blob/main/Deepgram/Models/Listen/v1/WebSocket/Channel.cs Unless they are accessible somewhere else and I've missed it. However, the equivalent Channel record in the REST section of the Listen/v1 does include Search as a property. https://github.com/deepgram/deepgram-dotnet-sdk/blob/main/Deepgram/Models/Listen/v1/REST/Channel.cs And its my understanding that this functionality should be supported in both.

dvonthenen commented 2 months ago

ahhhh gotcha. will take a look. thanks for the detail.

ElliotEserin commented 2 months ago

Great, thank you!