diff --git a/Deepgram.Tests/UnitTests/ClientTests/AbstractRestClientTests.cs b/Deepgram.Tests/UnitTests/ClientTests/AbstractRestClientTests.cs
index 2a99c127..7250231a 100644
--- a/Deepgram.Tests/UnitTests/ClientTests/AbstractRestClientTests.cs
+++ b/Deepgram.Tests/UnitTests/ClientTests/AbstractRestClientTests.cs
@@ -18,7 +18,10 @@ public class AbstractRestfulClientTests
public void Setup()
{
_apiKey = new Faker().Random.Guid().ToString();
- _clientOptions = new DeepgramHttpClientOptions(_apiKey, null, null, true);
+ _clientOptions = new DeepgramHttpClientOptions(_apiKey)
+ {
+ OnPrem = true,
+ };
}
[Test]
diff --git a/Deepgram.Tests/UnitTests/ClientTests/AnalyzeClientTests.cs b/Deepgram.Tests/UnitTests/ClientTests/AnalyzeClientTests.cs
index dac96580..9171a071 100644
--- a/Deepgram.Tests/UnitTests/ClientTests/AnalyzeClientTests.cs
+++ b/Deepgram.Tests/UnitTests/ClientTests/AnalyzeClientTests.cs
@@ -17,7 +17,10 @@ public class AnalyzeClientTests
public void Setup()
{
_apiKey = new Faker().Random.Guid().ToString();
- _options = new DeepgramHttpClientOptions(_apiKey, null, null, true);
+ _options = new DeepgramHttpClientOptions(_apiKey)
+ {
+ OnPrem = true,
+ };
}
[Test]
diff --git a/Deepgram.Tests/UnitTests/ClientTests/ManageClientTest.cs b/Deepgram.Tests/UnitTests/ClientTests/ManageClientTest.cs
index 308b177e..6732e5b6 100644
--- a/Deepgram.Tests/UnitTests/ClientTests/ManageClientTest.cs
+++ b/Deepgram.Tests/UnitTests/ClientTests/ManageClientTest.cs
@@ -19,7 +19,10 @@ public class ManageClientTest
public void Setup()
{
_apiKey = new Faker().Random.Guid().ToString();
- _options = new DeepgramHttpClientOptions(_apiKey, null, null, true);
+ _options = new DeepgramHttpClientOptions(_apiKey)
+ {
+ OnPrem = true,
+ };
_projectId = new Faker().Random.Guid().ToString();
}
diff --git a/Deepgram.Tests/UnitTests/ClientTests/OnPremClientTests.cs b/Deepgram.Tests/UnitTests/ClientTests/OnPremClientTests.cs
index 577436f8..1bc46c38 100644
--- a/Deepgram.Tests/UnitTests/ClientTests/OnPremClientTests.cs
+++ b/Deepgram.Tests/UnitTests/ClientTests/OnPremClientTests.cs
@@ -17,7 +17,10 @@ public class OnPremClientTests
public void Setup()
{
_apiKey = new Faker().Random.Guid().ToString();
- _options = new DeepgramHttpClientOptions(_apiKey, null, null, true);
+ _options = new DeepgramHttpClientOptions(_apiKey)
+ {
+ OnPrem = true,
+ };
_projectId = new Faker().Random.Guid().ToString();
}
diff --git a/Deepgram.Tests/UnitTests/ClientTests/PrerecordedClientTests.cs b/Deepgram.Tests/UnitTests/ClientTests/PrerecordedClientTests.cs
index 5e1a5200..867498bc 100644
--- a/Deepgram.Tests/UnitTests/ClientTests/PrerecordedClientTests.cs
+++ b/Deepgram.Tests/UnitTests/ClientTests/PrerecordedClientTests.cs
@@ -17,7 +17,10 @@ public class PreRecordedClientTests
public void Setup()
{
_apiKey = new Faker().Random.Guid().ToString();
- _options = new DeepgramHttpClientOptions(_apiKey, null, null, true);
+ _options = new DeepgramHttpClientOptions(_apiKey)
+ {
+ OnPrem = true,
+ };
}
[Test]
diff --git a/Deepgram.Tests/UnitTests/ClientTests/SpeakClientTests.cs b/Deepgram.Tests/UnitTests/ClientTests/SpeakClientTests.cs
index f340bc55..e7281b0f 100644
--- a/Deepgram.Tests/UnitTests/ClientTests/SpeakClientTests.cs
+++ b/Deepgram.Tests/UnitTests/ClientTests/SpeakClientTests.cs
@@ -17,7 +17,10 @@ public class SpeakClientTests
public void Setup()
{
_apiKey = new Faker().Random.Guid().ToString();
- _options = new DeepgramHttpClientOptions(_apiKey, null, null, true);
+ _options = new DeepgramHttpClientOptions(_apiKey)
+ {
+ OnPrem = true,
+ };
}
//[Test]
diff --git a/Deepgram.Tests/UnitTests/HttpExtensionsTests/HttpClientExtensionTests.cs b/Deepgram.Tests/UnitTests/HttpExtensionsTests/HttpClientExtensionTests.cs
index d581d796..7786e38e 100644
--- a/Deepgram.Tests/UnitTests/HttpExtensionsTests/HttpClientExtensionTests.cs
+++ b/Deepgram.Tests/UnitTests/HttpExtensionsTests/HttpClientExtensionTests.cs
@@ -70,7 +70,7 @@ public void Should_Return_HttpClient_With_Default_BaseAddress_And_Custom_Headers
{
// Input and Output
var _apiKey = new Faker().Random.Guid().ToString();
- var _clientOptions = new DeepgramHttpClientOptions(_apiKey, null, null, null, FakeHeaders());
+ var _clientOptions = new DeepgramHttpClientOptions(_apiKey, null, null, FakeHeaders());
// Fake Clients
var httpClient = MockHttpClient.CreateHttpClientWithResult(new MessageResponse(), HttpStatusCode.OK);
@@ -95,7 +95,7 @@ public void Should_Return_HttpClient_With_Custom_BaseAddress_And_Custom_Headers(
var expectedBaseAddress = $"https://{_customUrl}/v1";
var customBaseAddress = $"https://{_customUrl}";
var _apiKey = new Faker().Random.Guid().ToString();
- var _clientOptions = new DeepgramHttpClientOptions(_apiKey, customBaseAddress, null, null, FakeHeaders());
+ var _clientOptions = new DeepgramHttpClientOptions(_apiKey, customBaseAddress, null, FakeHeaders());
// Fake Clients
var httpClient = MockHttpClient.CreateHttpClientWithResult(new MessageResponse(), HttpStatusCode.OK);
@@ -122,7 +122,7 @@ public void Should_Return_HttpClient_With_Predefined_Values()
var expectedBaseAddress = $"https://{_customUrl}/v1";
var customBaseAddress = $"https://{_customUrl}";
var _apiKey = new Faker().Random.Guid().ToString();
- var _clientOptions = new DeepgramHttpClientOptions(_apiKey, customBaseAddress, null, null, FakeHeaders());
+ var _clientOptions = new DeepgramHttpClientOptions(_apiKey, customBaseAddress, null, FakeHeaders());
// Fake Clients
var httpClient = MockHttpClient.CreateHttpClientWithResult(new MessageResponse(), HttpStatusCode.OK, expectedBaseAddress);
diff --git a/Deepgram/Abstractions/AbstractRestClient.cs b/Deepgram/Abstractions/AbstractRestClient.cs
index 1b29ce1f..b806fe34 100644
--- a/Deepgram/Abstractions/AbstractRestClient.cs
+++ b/Deepgram/Abstractions/AbstractRestClient.cs
@@ -34,7 +34,6 @@ internal AbstractRestClient(string? apiKey = null, DeepgramHttpClientOptions? op
Log.Debug("AbstractRestClient", $"APIVersion: {options.APIVersion}");
Log.Debug("AbstractRestClient", $"BaseAddress: {options.BaseAddress}");
- Log.Debug("AbstractRestClient", $"KeepAlive: {options.KeepAlive}");
Log.Debug("AbstractRestClient", $"options: {options.OnPrem}");
Log.Verbose("AbstractRestClient", "LEAVE");
}
diff --git a/Deepgram/Models/Authenticate/v1/DeepgramHttpClientOptions.cs b/Deepgram/Models/Authenticate/v1/DeepgramHttpClientOptions.cs
index 85bac4a8..0b76bc88 100644
--- a/Deepgram/Models/Authenticate/v1/DeepgramHttpClientOptions.cs
+++ b/Deepgram/Models/Authenticate/v1/DeepgramHttpClientOptions.cs
@@ -37,14 +37,6 @@ public class DeepgramHttpClientOptions
// Prerecorded
/*****************************/
- /*****************************/
- // Live
- /*****************************/
- ///
- /// Enable sending KeepAlives for Streaming
- ///
- public bool KeepAlive { get; set; } = false;
-
/*****************************/
// OnPrem
/*****************************/
@@ -61,27 +53,26 @@ public class DeepgramHttpClientOptions
// Analyze
/*****************************/
+ /*****************************/
+ // Speak
+ /*****************************/
+
/*****************************/
// Constructor
/*****************************/
- public DeepgramHttpClientOptions(string? apiKey = null, string? baseAddress = null, bool? keepAlive = null, bool? onPrem = null, Dictionary? headers = null, string? apiVersion = null)
+ public DeepgramHttpClientOptions(string? apiKey = null, string? baseAddress = null, bool? onPrem = null, Dictionary? headers = null)
{
Log.Verbose("DeepgramHttpClientOptions", "ENTER");
Log.Debug("DeepgramHttpClientOptions", apiKey == null ? "API KEY is null" : "API KEY provided");
Log.Debug("DeepgramHttpClientOptions", baseAddress == null ? "BaseAddress is null" : "BaseAddress provided");
- Log.Debug("DeepgramHttpClientOptions", keepAlive == null ? "KeepAlive is null" : "KeepAlive provided");
Log.Debug("DeepgramHttpClientOptions", onPrem == null ? "OnPrem is null" : "OnPrem provided");
Log.Debug("DeepgramHttpClientOptions", headers == null ? "Headers is null" : "Headers provided");
- Log.Debug("DeepgramHttpClientOptions", apiVersion == null ? "API Version is null" : "API Version provided");
ApiKey = apiKey ?? "";
BaseAddress = baseAddress ?? Defaults.DEFAULT_URI;
- KeepAlive = keepAlive ?? false;
OnPrem = onPrem ?? false;
Headers = headers ?? new Dictionary();
- APIVersion = apiVersion ?? Defaults.DEFAULT_API_VERSION;
- Log.Information("DeepgramHttpClientOptions", $"KeepAlive: {KeepAlive}");
Log.Information("DeepgramHttpClientOptions", $"OnPrem: {OnPrem}");
Log.Information("DeepgramHttpClientOptions", $"APIVersion: {APIVersion}");
diff --git a/Deepgram/Models/Authenticate/v1/DeepgramWsClientOptions.cs b/Deepgram/Models/Authenticate/v1/DeepgramWsClientOptions.cs
index f95c251f..88e6bddd 100644
--- a/Deepgram/Models/Authenticate/v1/DeepgramWsClientOptions.cs
+++ b/Deepgram/Models/Authenticate/v1/DeepgramWsClientOptions.cs
@@ -33,10 +33,6 @@ public class DeepgramWsClientOptions
///
public Dictionary Headers { get; set; }
- /*****************************/
- // Prerecorded
- /*****************************/
-
/*****************************/
// Live
/*****************************/
@@ -54,17 +50,13 @@ public class DeepgramWsClientOptions
public bool OnPrem { get; set; } = false;
/*****************************/
- // Manage
- /*****************************/
-
- /*****************************/
- // Analyze
+ // Speak
/*****************************/
/*****************************/
// Constructor
/*****************************/
- public DeepgramWsClientOptions(string? apiKey = null, string? baseAddress = null, bool? keepAlive = null, bool? onPrem = null, Dictionary? headers = null, string? apiVersion = null)
+ public DeepgramWsClientOptions(string? apiKey = null, string? baseAddress = null, bool? keepAlive = null, bool? onPrem = null, Dictionary? headers = null)
{
Log.Verbose("DeepgramWsClientOptions", "ENTER");
Log.Debug("DeepgramWsClientOptions", apiKey == null ? "API KEY is null" : "API KEY provided");
@@ -72,14 +64,12 @@ public DeepgramWsClientOptions(string? apiKey = null, string? baseAddress = null
Log.Debug("DeepgramWsClientOptions", keepAlive == null ? "KeepAlive is null" : "KeepAlive provided");
Log.Debug("DeepgramWsClientOptions", onPrem == null ? "OnPrem is null" : "OnPrem provided");
Log.Debug("DeepgramWsClientOptions", headers == null ? "Headers is null" : "Headers provided");
- Log.Debug("DeepgramWsClientOptions", apiVersion == null ? "API Version is null" : "API Version provided");
ApiKey = apiKey ?? "";
BaseAddress = baseAddress ?? Defaults.DEFAULT_URI;
KeepAlive = keepAlive ?? false;
OnPrem = onPrem ?? false;
Headers = headers ?? new Dictionary();
- APIVersion = apiVersion ?? Defaults.DEFAULT_API_VERSION;
Log.Information("DeepgramWsClientOptions", $"KeepAlive: {KeepAlive}");
Log.Information("DeepgramWsClientOptions", $"OnPrem: {OnPrem}");
diff --git a/examples/prerecorded/file/Program.cs b/examples/prerecorded/file/Program.cs
index e35bce1b..261297ce 100644
--- a/examples/prerecorded/file/Program.cs
+++ b/examples/prerecorded/file/Program.cs
@@ -44,6 +44,7 @@ static async Task Main(string[] args)
});
Console.WriteLine($"\n\n{JsonSerializer.Serialize(response, options)}\n\n");
+ Console.WriteLine("Press any key to exit...");
Console.ReadKey();
// Teardown Library