Skip to content

Fix SpeechStartedResponse.Channel mapped property#407

Merged
GregHolmes merged 2 commits into
deepgram:mainfrom
richardszalay:fix/speech-started-channel
May 29, 2026
Merged

Fix SpeechStartedResponse.Channel mapped property#407
GregHolmes merged 2 commits into
deepgram:mainfrom
richardszalay:fix/speech-started-channel

Conversation

@richardszalay

Copy link
Copy Markdown
Contributor

Proposed changes

The SpeechStartedResponse class is intended to represent the ListenV1SpeechStarted type from the listen WebSocket endpoint.

SpeechStartedResponse.Channel defines a JSON mapping of [JsonPropertyName("channel_index")], but this is incorrect as the documentation defines this property as channel and data returned from the actual API aligns with the documentation.

This PR simply corrects the mapped JSON so that the Channel property is populated correctly.

Types of changes

What types of changes does your code introduce to the community .NET SDK?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update or tests (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have lint'ed all of my code using repo standards
  • I have added tests that prove my fix is effective or that my feature works
    • N/A there are no existing model serialization tests to update
  • I have added necessary documentation (if appropriate)
    • N/A this change updates the code to match the existing documentation

@richardszalay richardszalay requested a review from lukeocodes as a code owner May 20, 2026 03:51
@GregHolmes

Copy link
Copy Markdown
Collaborator

Hi @richardszalay, thank you for the fix. I've confirmed against our AsyncAPI spec (ListenV1SpeechStartedEvent defines the field as channel), and our JS and Java SDKs both serialize it as channel too. Scope looks right: v1 and v2 are both updated, and the deprecated Deepgram.Models.Live.v1.SpeechStartedResponse inherits from the v1 record so it picks up the fix automatically.

One thing I have noticed while reviewing is the same bug exists in UtteranceEndResponse (both v1 and v2), which also maps Channel to channel_index but the spec defines it as channel (and our JS/Java SDKs agree). Happy to take that as a follow-up PR if you'd prefer to keep this one scoped, or if you'd like to extend this PR to cover it as well that would be greatly appreciated, let me know which you'd prefer.

For reference, ResultResponse.channel_index is correct as-is, the spec really does use channel_index for that event.

@GregHolmes GregHolmes self-requested a review May 21, 2026 09:13
@richardszalay

Copy link
Copy Markdown
Contributor Author

@GregHolmes Done!

While I have you looking at my PR, would you consider merging #408 for the next release too?

@GregHolmes

Copy link
Copy Markdown
Collaborator

Thank you @richardszalay I'll look at #408 now.

@richardszalay

Copy link
Copy Markdown
Contributor Author

Hi @GregHolmes, do you have any indication when these PRs can be merged/released? We're running into some issues around multi-channel events and this would help us resolve it.

@GregHolmes GregHolmes merged commit a432869 into deepgram:main May 29, 2026
2 checks passed
@GregHolmes

Copy link
Copy Markdown
Collaborator

Hi @GregHolmes, do you have any indication when these PRs can be merged/released? We're running into some issues around multi-channel events and this would help us resolve it.

@richardszalay I'm sorry for the delay, there were a few hoops for me to jump through to get this release out. I've just pushed the release and can see it appearing as 6.7.0. I hope this resolves the issues you're encountering, and thank you so much for spending the time to flag and fix the issues with the SDK.

@richardszalay

Copy link
Copy Markdown
Contributor Author

Thanks @GregHolmes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants