Closed ElliotEserin closed 3 months ago
The changes introduce new functionalities to the Deepgram .NET SDK by adding support for search queries in the Listen V1 WebSocket channels. This enhancement includes the addition of new data structures for handling search data, aligning the SDK's capabilities with the Deepgram API's existing features. The updates facilitate more efficient audio recognition and analysis by incorporating search results directly into the channel's data model.
File | Change Summary |
---|---|
Deepgram/Models/Listen/v1/WebSocket/Channel.cs |
- Added public IReadOnlyList<Search>? Search { get; set; } property for search-related information. |
Deepgram/Models/Listen/v1/WebSocket/Hit.cs |
- Introduced Hit record with properties: Confidence , End , Snippet , Start , and an overridden ToString method. |
Deepgram/Models/Listen/v1/WebSocket/Search.cs |
- Created Search record with properties: Query (string) and Hits (IReadOnlyListToString method. |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Awesome @ElliotEserin Thanks for opening up this PR!
No problem, I hope it's useful!
Proposed changes
Issue - Add the Search property to the Listen WebSocket channel. This mirrors the current REST equivalent for the channel record. This property is deserialized from the JSON response returned by the Deepgram Response Schema
Types of changes
What types of changes does your code introduce to the community .NET SDK? Put an
x
in the boxes that applyChecklist
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.Further comments
I thought I would give this a go myself and this is actually my first PR ever... So feel free to tell me how I could improve, or feel free to throw it out if it isn't good enough! I couldn't find anything in the contribution guidelines on this repos standards for linting, however the code is 100% copy-pasted from other areas of the project so hopefully it is suitable!
Summary by CodeRabbit
Search
property in the audioChannel
record for enhanced data handling.Hit
record to encapsulate audio recognition details such as confidence level and timing.Search
record to facilitate search queries, containing properties for query and results.These additions improve the API's ability to manage and analyze audio recognition data effectively.