Closed davidvonthenen closed 7 months ago
The update enhances the solution with two new projects for HTTP and Streaming functionalities. It also modifies various models to support nullable types for improved data handling flexibility. Additionally, a sample application has been added to demonstrate live streaming service integration and transcript processing using Deepgram's API, showcasing practical implementation and usage.
File Path | Change Summary |
---|---|
Deepgram.Dev.sln |
Added "http" and "Streaming" projects, including references and build configurations. |
Deepgram/Models/Live/v1/Alternative.cs |
Changed Confidence to nullable double . |
Deepgram/Models/Live/v1/Channel.cs |
Made Alternatives property nullable. |
Deepgram/Models/Live/v1/Metadata.cs |
Updated RequestId , ModelUUID , ModelInfo to allow null values. |
Deepgram/Models/Live/v1/ModelInfo.cs |
Updated Arch , Name , Version to allow null values. |
Deepgram/Models/Live/v1/ResultResponse.cs |
Made Duration , IsFinal , SpeechFinal , Start , and Type nullable. |
Deepgram/Models/Live/v1/Word.cs |
Changed Start , End , Confidence to nullable types. |
Deepgram/Models/PreRecorded/v1/Topic.cs |
Made Text property nullable. |
Deepgram/Factory/HttpClientFactory.cs |
Added logging for HttpClient instance creation. |
examples/analyze/intent/Program.cs |
Modified logging settings, increased timeout, and added cancelToken parameter. |
examples/streaming/http/Program.cs |
Added functionality for live streaming service integration and transcript processing. |
examples/streaming/http/Streaming.csproj |
New project for .NET 6.0, includes references, enables nullable, copies preamble.wav . |
test (8.0.x) success (6)
Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'. --- Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'. --- Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'. --- Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'.test (7.0.x) success (6)
Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'. --- Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'. --- Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'. --- Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'.test (6.0.x) success (6)
Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'. --- Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'. --- Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'. --- Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'.build success (10)
Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'. --- Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'. --- Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'. --- Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'. --- Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'. --- Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'. --- Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'. --- Deepgram/Factory/HttpClientFactory.cs: [warning] 27-27: Possible null reference argument for parameter 'name' in 'HttpClient IHttpClientFactory.CreateClient(string name)'.
Deepgram/Models/Live/v1/Channel.cs (1)
`14-14`: Making the `Alternatives` property nullable enhances flexibility in handling cases where data might not be available. This change aligns well with the PR objectives.Deepgram/Models/PreRecorded/v1/Topic.cs (1)
`21-21`: Making the `Text` property nullable enhances flexibility in handling cases where data might not be available. This change aligns well with the PR objectives.Deepgram/Models/Live/v1/ModelInfo.cs (3)
`14-14`: Making the `Arch` property nullable enhances flexibility in handling cases where data might not be available. This change aligns well with the PR objectives. --- `21-21`: Making the `Name` property nullable enhances flexibility in handling cases where data might not be available. This change aligns well with the PR objectives. --- `28-28`: Making the `Version` property nullable enhances flexibility in handling cases where data might not be available. This change aligns well with the PR objectives.Deepgram/Models/Live/v1/Metadata.cs (3)
`14-14`: Making the `RequestId` property nullable enhances flexibility in handling cases where data might not be available. This change aligns well with the PR objectives. --- `21-21`: Making the `ModelUUID` property nullable enhances flexibility in handling cases where data might not be available. This change aligns well with the PR objectives. --- `28-28`: Making the `ModelInfo` property nullable enhances flexibility in handling cases where data might not be available. This change aligns well with the PR objectives.examples/analyze/intent/Program.cs (4)
`8-8`: The addition of `Deepgram.Logger` import is appropriate for enhanced logging capabilities in this example. --- `20-20`: Setting the logging level to `Debug` is a good practice for detailed output in development environments. Ensure this is configurable for production use. --- `40-40`: Increasing the timeout to 120 seconds is appropriate for operations that might take longer. Ensure this value meets the expected operation times.Verification successful
--- The timeout of 120 seconds in `Program.cs` is significantly higher than the default 30 seconds used in other parts of the codebase. This suggests that the operations in `Program.cs` might require more time, possibly due to their complexity or data intensity. It is recommended to validate this timeout setting based on the actual operation times to ensure it is neither excessive nor insufficient.--- `50-50`: Passing the `cancelToken` to the `AnalyzeFile` method is a good practice to handle potential long-running operations gracefully.Scripts Executed
The following scripts were executed for the analysis: --- Script: ```shell #!/bin/bash # Verify that the 120 seconds timeout is sufficient and not excessive for the operations performed. grep -R "CancelAfter" . ``` Length of output: 1240 --- --- Script: ```shell #!/bin/bash # Extract the value of Constants.DefaultRESTTimeout grep "DefaultRESTTimeout" ./Deepgram/Abstractions/AbstractRestClient.cs ``` Length of output: 1787 --- --- Script: ```shell #!/bin/bash # Find the definition of Constants.DefaultRESTTimeout grep -R "DefaultRESTTimeout =" . ``` Length of output: 129Deepgram/Factory/HttpClientFactory.cs (1)
`19-19`: The addition of a logging statement for `HttpClient` creation is a good practice for monitoring and debugging.
Example for doing HTTP Webcast from BBC to LiveClient.
This exposed some params that need to be null'able when certain options are not set.