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

`UtteranceEndResponse` does not include the `Extra Metadata`

Open ThomasBurgess2000 opened this issue 10 months ago • 1 comments

What is the current behavior?

The UtteranceEndResponse does not include the Extra Metadata. https://pkg.go.dev/github.com/deepgram/deepgram-go-sdk/[email protected]/pkg/api/listen/v1/websocket/interfaces#UtteranceEndResponse

Expected behavior

I expect it to include the Extra Metadata since the docs say:

Deepgram’s Extra Metadata feature allows you to attach arbitrary key-value pairs to your API requests that are attached to the API response for usage in downstream processing.

I use this field to know which session a response is associated with, which I can't do if it's not included in every message type.

ThomasBurgess2000 avatar Jun 17 '25 21:06 ThomasBurgess2000

hacked together what I wanted in a fork here https://github.com/ThomasBurgess2000/deepgram-go-sdk-with-extra-injection/blob/ba6f211be831bf51b282287aba895c7492ebe0b0/pkg/api/listen/v1/websocket/chan_router.go#L222

gets the extras from the first message response and then injects it into future utteranceEnd responses

ThomasBurgess2000 avatar Jun 18 '25 03:06 ThomasBurgess2000