deepgram/deepgram-dotnet-sdk

Using callback URI doesn't return request ID

Closed this issue · 3 comments

What is the current behavior?

When calling GetTranscriptionAsync, and PrerecordedTranscriptionOptions.Callback is set to a URI, the transcription response object doesn't contain the request ID.

In this situation, it appears that the JSON response will be:

{ "request_id": "c22bea24-ecd3-4b53-bcbf-8ef087d905a5" }

https://developers.deepgram.com/docs/using-callbacks-to-return-transcripts-to-your-server#see-results

What's happening that seems wrong?

The SDK is deserializing into PrerecordedTranscription type, but the schema is different, so nothing is getting set.

Steps to reproduce

To make it faster to diagnose the root problem. Tell us how can we reproduce the bug.

var options = new PrerecordedTranscriptionOptions { Callback = "{uri}" };

var transcription = await client.Transcription.Prerecorded.GetTranscriptionAsync(new UrlSource(uri.AbsoluteUri), options);

Expected behavior

What would you expect to happen when following the steps above?

Could add a field for ID to the root of PrerecordedTranscription, so it gets set in this situation.

I'd like to be able to log this ID for debugging the webhook callback.

Please tell us about your environment

We want to make sure the problem isn't specific to your operating system or programming language.

  • Operating System/Version: Windows 11
  • Language: C# .NET 6.0

Other information

Just noticed there's already a PR from January for this. Would be great to get this added.

I'm going to have to build my own REST client, otherwise.

#61

We're working on resolving a few missing features and a little bit of a gap on this SDK. Thanks for your patience on this

Fixed in #111