diff --git a/src/libs/Soniox/Generated/Soniox.ISonioxClient.g.cs b/src/libs/Soniox/Generated/Soniox.ISonioxClient.g.cs
index 920bf4f..10c3970 100644
--- a/src/libs/Soniox/Generated/Soniox.ISonioxClient.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.ISonioxClient.g.cs
@@ -79,5 +79,10 @@ public partial interface ISonioxClient : global::System.IDisposable
///
public UsageLogsClient UsageLogs { get; }
+ ///
+ ///
+ ///
+ public VoicesClient Voices { get; }
+
}
}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.IVoicesClient.CreateVoice.g.cs b/src/libs/Soniox/Generated/Soniox.IVoicesClient.CreateVoice.g.cs
new file mode 100644
index 0000000..7cfc9b2
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.IVoicesClient.CreateVoice.g.cs
@@ -0,0 +1,101 @@
+#nullable enable
+
+namespace Soniox
+{
+ public partial interface IVoicesClient
+ {
+ ///
+ /// Create voice
+ /// Uploads a reference audio clip and creates a new voice.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task CreateVoiceAsync(
+
+ global::Soniox.CreateVoiceRequest request,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Create voice
+ /// Uploads a reference audio clip and creates a new voice.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> CreateVoiceAsResponseAsync(
+
+ global::Soniox.CreateVoiceRequest request,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Create voice
+ /// Uploads a reference audio clip and creates a new voice.
+ ///
+ ///
+ /// A name for the voice, unique within your project.
+ ///
+ ///
+ /// The reference audio clip for the voice.
+ ///
+ ///
+ /// The reference audio clip for the voice.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task CreateVoiceAsync(
+ string name,
+ byte[] file,
+ string filename,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+
+ ///
+ /// Create voice
+ /// Uploads a reference audio clip and creates a new voice.
+ ///
+ ///
+ /// A name for the voice, unique within your project.
+ ///
+ ///
+ /// The reference audio clip for the voice.
+ ///
+ ///
+ /// The reference audio clip for the voice.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task CreateVoiceAsync(
+ string name,
+ global::System.IO.Stream file,
+ string filename,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Create voice
+ /// Uploads a reference audio clip and creates a new voice.
+ ///
+ ///
+ /// A name for the voice, unique within your project.
+ ///
+ ///
+ /// The reference audio clip for the voice.
+ ///
+ ///
+ /// The reference audio clip for the voice.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> CreateVoiceAsResponseAsync(
+ string name,
+ global::System.IO.Stream file,
+ string filename,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.IVoicesClient.DeleteVoice.g.cs b/src/libs/Soniox/Generated/Soniox.IVoicesClient.DeleteVoice.g.cs
new file mode 100644
index 0000000..5c8ca72
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.IVoicesClient.DeleteVoice.g.cs
@@ -0,0 +1,32 @@
+#nullable enable
+
+namespace Soniox
+{
+ public partial interface IVoicesClient
+ {
+ ///
+ /// Delete voice
+ /// Permanently deletes the specified voice and its embeddings.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task DeleteVoiceAsync(
+ global::System.Guid voiceId,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Delete voice
+ /// Permanently deletes the specified voice and its embeddings.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task DeleteVoiceAsResponseAsync(
+ global::System.Guid voiceId,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.IVoicesClient.GetVoice.g.cs b/src/libs/Soniox/Generated/Soniox.IVoicesClient.GetVoice.g.cs
new file mode 100644
index 0000000..ccf69d0
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.IVoicesClient.GetVoice.g.cs
@@ -0,0 +1,32 @@
+#nullable enable
+
+namespace Soniox
+{
+ public partial interface IVoicesClient
+ {
+ ///
+ /// Get voice
+ /// Retrieve metadata for a voice.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetVoiceAsync(
+ global::System.Guid voiceId,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get voice
+ /// Retrieve metadata for a voice.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetVoiceAsResponseAsync(
+ global::System.Guid voiceId,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.IVoicesClient.GetVoices.g.cs b/src/libs/Soniox/Generated/Soniox.IVoicesClient.GetVoices.g.cs
new file mode 100644
index 0000000..a609c25
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.IVoicesClient.GetVoices.g.cs
@@ -0,0 +1,46 @@
+#nullable enable
+
+namespace Soniox
+{
+ public partial interface IVoicesClient
+ {
+ ///
+ /// Get voices
+ /// Retrieves the list of voices in your project.
+ ///
+ ///
+ /// Maximum number of voices to return.
+ /// Default Value: 1000
+ ///
+ ///
+ /// Pagination cursor for the next page of results.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetVoicesAsync(
+ int? limit = default,
+ string? cursor = default,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get voices
+ /// Retrieves the list of voices in your project.
+ ///
+ ///
+ /// Maximum number of voices to return.
+ /// Default Value: 1000
+ ///
+ ///
+ /// Pagination cursor for the next page of results.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetVoicesAsResponseAsync(
+ int? limit = default,
+ string? cursor = default,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.IVoicesClient.GetVoicesCount.g.cs b/src/libs/Soniox/Generated/Soniox.IVoicesClient.GetVoicesCount.g.cs
new file mode 100644
index 0000000..24a1b15
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.IVoicesClient.GetVoicesCount.g.cs
@@ -0,0 +1,28 @@
+#nullable enable
+
+namespace Soniox
+{
+ public partial interface IVoicesClient
+ {
+ ///
+ /// Get voices count
+ /// Returns the total number of voices in your project.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetVoicesCountAsync(
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get voices count
+ /// Returns the total number of voices in your project.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetVoicesCountAsResponseAsync(
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.IVoicesClient.RecomputeVoice.g.cs b/src/libs/Soniox/Generated/Soniox.IVoicesClient.RecomputeVoice.g.cs
new file mode 100644
index 0000000..009dc1d
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.IVoicesClient.RecomputeVoice.g.cs
@@ -0,0 +1,54 @@
+#nullable enable
+
+namespace Soniox
+{
+ public partial interface IVoicesClient
+ {
+ ///
+ /// Recompute voice
+ /// Prepares the voice for use with available models it is not ready for yet. Use this after a new model is released to make an existing voice usable with it. Models the voice is already prepared for are left unchanged.
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task RecomputeVoiceAsync(
+ global::System.Guid voiceId,
+
+ global::Soniox.RecomputeVoicePayload request,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Recompute voice
+ /// Prepares the voice for use with available models it is not ready for yet. Use this after a new model is released to make an existing voice usable with it. Models the voice is already prepared for are left unchanged.
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> RecomputeVoiceAsResponseAsync(
+ global::System.Guid voiceId,
+
+ global::Soniox.RecomputeVoicePayload request,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Recompute voice
+ /// Prepares the voice for use with available models it is not ready for yet. Use this after a new model is released to make an existing voice usable with it. Models the voice is already prepared for are left unchanged.
+ ///
+ ///
+ ///
+ /// The model to prepare this voice for. If omitted, the voice is prepared for every available model it is not ready for yet.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task RecomputeVoiceAsync(
+ global::System.Guid voiceId,
+ string? model = default,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.IVoicesClient.g.cs b/src/libs/Soniox/Generated/Soniox.IVoicesClient.g.cs
new file mode 100644
index 0000000..6db3508
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.IVoicesClient.g.cs
@@ -0,0 +1,48 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ public partial interface IVoicesClient : global::System.IDisposable
+ {
+ ///
+ /// The HttpClient instance.
+ ///
+ public global::System.Net.Http.HttpClient HttpClient { get; }
+
+ ///
+ /// The base URL for the API.
+ ///
+ public System.Uri? BaseUri { get; }
+
+ ///
+ /// The authorizations to use for the requests.
+ ///
+ public global::System.Collections.Generic.List Authorizations { get; }
+
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ /// When false, successful responses are deserialized directly from the response stream for better performance.
+ /// Error responses are always read as strings regardless of this setting,
+ /// ensuring is populated.
+ ///
+ public bool ReadResponseAsString { get; set; }
+ ///
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ ///
+ public global::Soniox.AutoSDKClientOptions Options { get; }
+
+
+ ///
+ ///
+ ///
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.JsonConverters.VoiceModelStatus.g.cs b/src/libs/Soniox/Generated/Soniox.JsonConverters.VoiceModelStatus.g.cs
new file mode 100644
index 0000000..3e12c36
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.JsonConverters.VoiceModelStatus.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Soniox.JsonConverters
+{
+ ///
+ public sealed class VoiceModelStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Soniox.VoiceModelStatus Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Soniox.VoiceModelStatusExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Soniox.VoiceModelStatus)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Soniox.VoiceModelStatus);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Soniox.VoiceModelStatus value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Soniox.VoiceModelStatusExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.JsonConverters.VoiceModelStatusNullable.g.cs b/src/libs/Soniox/Generated/Soniox.JsonConverters.VoiceModelStatusNullable.g.cs
new file mode 100644
index 0000000..6058e13
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.JsonConverters.VoiceModelStatusNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Soniox.JsonConverters
+{
+ ///
+ public sealed class VoiceModelStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Soniox.VoiceModelStatus? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Soniox.VoiceModelStatusExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Soniox.VoiceModelStatus)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Soniox.VoiceModelStatus?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Soniox.VoiceModelStatus? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::Soniox.VoiceModelStatusExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.JsonSerializerContext.g.cs b/src/libs/Soniox/Generated/Soniox.JsonSerializerContext.g.cs
index ae096cc..dc9acaa 100644
--- a/src/libs/Soniox/Generated/Soniox.JsonSerializerContext.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.JsonSerializerContext.g.cs
@@ -21,6 +21,10 @@ namespace Soniox
typeof(global::Soniox.JsonConverters.TranslationConfigTypeNullableJsonConverter),
+ typeof(global::Soniox.JsonConverters.VoiceModelStatusJsonConverter),
+
+ typeof(global::Soniox.JsonConverters.VoiceModelStatusNullableJsonConverter),
+
typeof(global::Soniox.JsonConverters.TranscriptionModeJsonConverter),
typeof(global::Soniox.JsonConverters.TranscriptionModeNullableJsonConverter),
@@ -86,6 +90,16 @@ namespace Soniox
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.TranscriptionTranscriptToken))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(double))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.GetVoicesPayload))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.GetVoicesResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.Voice))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.VoiceModel))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.VoiceModelStatus), TypeInfoPropertyName = "VoiceModelStatus2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.UploadVoicePayload))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.GetVoicesCountResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.RecomputeVoicePayload))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.GetModelsResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.Model))]
@@ -115,6 +129,7 @@ namespace Soniox
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.LimitValues))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.UploadFileRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.CreateVoiceRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.GetUsageLogsSort2), TypeInfoPropertyName = "GetUsageLogsSort22")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
@@ -123,6 +138,8 @@ namespace Soniox
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
diff --git a/src/libs/Soniox/Generated/Soniox.JsonSerializerContextTypes.g.cs b/src/libs/Soniox/Generated/Soniox.JsonSerializerContextTypes.g.cs
index 8bf6862..10458c1 100644
--- a/src/libs/Soniox/Generated/Soniox.JsonSerializerContextTypes.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.JsonSerializerContextTypes.g.cs
@@ -172,123 +172,167 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::Soniox.GetModelsResponse? Type36 { get; set; }
+ public global::Soniox.GetVoicesPayload? Type36 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type37 { get; set; }
+ public global::Soniox.GetVoicesResponse? Type37 { get; set; }
///
///
///
- public global::Soniox.Model? Type38 { get; set; }
+ public global::System.Collections.Generic.IList? Type38 { get; set; }
///
///
///
- public global::Soniox.Language? Type39 { get; set; }
+ public global::Soniox.Voice? Type39 { get; set; }
///
///
///
- public global::Soniox.TranscriptionMode? Type40 { get; set; }
+ public global::System.Collections.Generic.IList? Type40 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type41 { get; set; }
+ public global::Soniox.VoiceModel? Type41 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type42 { get; set; }
+ public global::Soniox.VoiceModelStatus? Type42 { get; set; }
///
///
///
- public global::Soniox.TranslationTarget? Type43 { get; set; }
+ public global::Soniox.UploadVoicePayload? Type43 { get; set; }
///
///
///
- public global::Soniox.GetTTSModelsResponse? Type44 { get; set; }
+ public global::Soniox.GetVoicesCountResponse? Type44 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type45 { get; set; }
+ public global::Soniox.RecomputeVoicePayload? Type45 { get; set; }
///
///
///
- public global::Soniox.TTSModel? Type46 { get; set; }
+ public global::Soniox.GetModelsResponse? Type46 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type47 { get; set; }
+ public global::System.Collections.Generic.IList? Type47 { get; set; }
///
///
///
- public global::Soniox.TTSVoice? Type48 { get; set; }
+ public global::Soniox.Model? Type48 { get; set; }
///
///
///
- public global::Soniox.TTSVoiceGender? Type49 { get; set; }
+ public global::Soniox.Language? Type49 { get; set; }
///
///
///
- public global::Soniox.GetUsageLogsPayload? Type50 { get; set; }
+ public global::Soniox.TranscriptionMode? Type50 { get; set; }
///
///
///
- public global::Soniox.GetUsageLogsPayloadSort? Type51 { get; set; }
+ public global::System.Collections.Generic.IList? Type51 { get; set; }
///
///
///
- public global::Soniox.UsageLogsSort? Type52 { get; set; }
+ public global::System.Collections.Generic.IList? Type52 { get; set; }
///
///
///
- public global::Soniox.GetUsageLogsResponse? Type53 { get; set; }
+ public global::Soniox.TranslationTarget? Type53 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type54 { get; set; }
+ public global::Soniox.GetTTSModelsResponse? Type54 { get; set; }
///
///
///
- public global::Soniox.UsageLogEntry? Type55 { get; set; }
+ public global::System.Collections.Generic.IList? Type55 { get; set; }
///
///
///
- public global::Soniox.CreateTemporaryApiKeyResponse? Type56 { get; set; }
+ public global::Soniox.TTSModel? Type56 { get; set; }
///
///
///
- public global::Soniox.CreateTemporaryApiKeyPayload? Type57 { get; set; }
+ public global::System.Collections.Generic.IList? Type57 { get; set; }
///
///
///
- public global::Soniox.TemporaryApiKeyUsageType? Type58 { get; set; }
+ public global::Soniox.TTSVoice? Type58 { get; set; }
///
///
///
- public global::Soniox.CurrentValues? Type59 { get; set; }
+ public global::Soniox.TTSVoiceGender? Type59 { get; set; }
///
///
///
- public global::Soniox.GetConcurrencyLimitsResponse? Type60 { get; set; }
+ public global::Soniox.GetUsageLogsPayload? Type60 { get; set; }
///
///
///
- public global::Soniox.ScopeValues? Type61 { get; set; }
+ public global::Soniox.GetUsageLogsPayloadSort? Type61 { get; set; }
///
///
///
- public global::Soniox.LimitValues? Type62 { get; set; }
+ public global::Soniox.UsageLogsSort? Type62 { get; set; }
///
///
///
- public global::Soniox.UploadFileRequest? Type63 { get; set; }
+ public global::Soniox.GetUsageLogsResponse? Type63 { get; set; }
///
///
///
- public byte[]? Type64 { get; set; }
+ public global::System.Collections.Generic.IList? Type64 { get; set; }
///
///
///
- public global::Soniox.GetUsageLogsSort2? Type65 { get; set; }
+ public global::Soniox.UsageLogEntry? Type65 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.CreateTemporaryApiKeyResponse? Type66 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.CreateTemporaryApiKeyPayload? Type67 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.TemporaryApiKeyUsageType? Type68 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.CurrentValues? Type69 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.GetConcurrencyLimitsResponse? Type70 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.ScopeValues? Type71 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.LimitValues? Type72 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.UploadFileRequest? Type73 { get; set; }
+ ///
+ ///
+ ///
+ public byte[]? Type74 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.CreateVoiceRequest? Type75 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.GetUsageLogsSort2? Type76 { get; set; }
///
///
@@ -321,26 +365,34 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::System.Collections.Generic.List? ListType7 { get; set; }
+ public global::System.Collections.Generic.List? ListType7 { get; set; }
+ ///
+ ///
+ ///
+ public global::System.Collections.Generic.List? ListType8 { get; set; }
+ ///
+ ///
+ ///
+ public global::System.Collections.Generic.List? ListType9 { get; set; }
///
///
///
- public global::System.Collections.Generic.List? ListType8 { get; set; }
+ public global::System.Collections.Generic.List? ListType10 { get; set; }
///
///
///
- public global::System.Collections.Generic.List? ListType9 { get; set; }
+ public global::System.Collections.Generic.List? ListType11 { get; set; }
///
///
///
- public global::System.Collections.Generic.List? ListType10 { get; set; }
+ public global::System.Collections.Generic.List? ListType12 { get; set; }
///
///
///
- public global::System.Collections.Generic.List? ListType11 { get; set; }
+ public global::System.Collections.Generic.List? ListType13 { get; set; }
///
///
///
- public global::System.Collections.Generic.List? ListType12 { get; set; }
+ public global::System.Collections.Generic.List? ListType14 { get; set; }
}
}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.CreateVoiceRequest.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.CreateVoiceRequest.Json.g.cs
new file mode 100644
index 0000000..a9c9623
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.CreateVoiceRequest.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class CreateVoiceRequest
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Soniox.CreateVoiceRequest? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.CreateVoiceRequest),
+ jsonSerializerContext) as global::Soniox.CreateVoiceRequest;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.CreateVoiceRequest? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Soniox.CreateVoiceRequest? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Soniox.CreateVoiceRequest),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.CreateVoiceRequest;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.CreateVoiceRequest.g.cs b/src/libs/Soniox/Generated/Soniox.Models.CreateVoiceRequest.g.cs
new file mode 100644
index 0000000..d302c1d
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.CreateVoiceRequest.g.cs
@@ -0,0 +1,71 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ ///
+ ///
+ public sealed partial class CreateVoiceRequest
+ {
+ ///
+ /// A name for the voice, unique within your project.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Name { get; set; }
+
+ ///
+ /// The reference audio clip for the voice.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("file")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required byte[] File { get; set; }
+
+ ///
+ /// The reference audio clip for the voice.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("filename")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Filename { get; set; }
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// A name for the voice, unique within your project.
+ ///
+ ///
+ /// The reference audio clip for the voice.
+ ///
+ ///
+ /// The reference audio clip for the voice.
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public CreateVoiceRequest(
+ string name,
+ byte[] file,
+ string filename)
+ {
+ this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name));
+ this.File = file ?? throw new global::System.ArgumentNullException(nameof(file));
+ this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename));
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public CreateVoiceRequest()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.File.g.cs b/src/libs/Soniox/Generated/Soniox.Models.File.g.cs
index 67ba363..98825b2 100644
--- a/src/libs/Soniox/Generated/Soniox.Models.File.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Models.File.g.cs
@@ -4,8 +4,7 @@
namespace Soniox
{
///
- /// File metadata.
- /// Example: {"client_reference_id":"some_internal_id","created_at":"2024-11-26T00:00:00Z","filename":"example.mp3","id":"84c32fc6-4fb5-4e7a-b656-b5ec70493753","size":123456}
+ ///
///
public sealed partial class File
{
diff --git a/src/libs/Soniox/Generated/Soniox.Models.GetModelsResponse.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetModelsResponse.g.cs
index a81da47..7e5babd 100644
--- a/src/libs/Soniox/Generated/Soniox.Models.GetModelsResponse.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetModelsResponse.g.cs
@@ -4,7 +4,7 @@
namespace Soniox
{
///
- /// Example: {"models":[{"aliased_model_id":null,"context_version":2,"id":"stt-rt-v5","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Real-time v5","one_way_translation":"all_languages","supports_endpoint_sensitivity":true,"supports_language_hints_strict":true,"supports_max_endpoint_delay":true,"transcription_mode":"real_time","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":null,"context_version":2,"id":"stt-rt-v4","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Real-time v4","one_way_translation":"all_languages","supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":true,"transcription_mode":"real_time","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":null,"context_version":2,"id":"stt-async-v5","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Async v5","one_way_translation":"all_languages","supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":false,"transcription_mode":"async","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":null,"context_version":2,"id":"stt-async-v4","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Async v4","one_way_translation":"all_languages","supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":false,"transcription_mode":"async","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":"stt-rt-v4","context_version":2,"id":"stt-rt-preview","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Real-time Preview","one_way_translation":"all_languages","supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":true,"transcription_mode":"real_time","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":"stt-async-v4","context_version":2,"id":"stt-async-preview","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Async Preview","one_way_translation":"all_languages","supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":false,"transcription_mode":"async","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":"stt-rt-v4","context_version":2,"id":"stt-rt-v3-preview","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Real-time v3 Preview","one_way_translation":"all_languages","supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":true,"transcription_mode":"real_time","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":"stt-rt-v4","context_version":2,"id":"stt-rt-preview-v2","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Real-time Preview v2","one_way_translation":"all_languages","supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":true,"transcription_mode":"real_time","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":"stt-async-v4","context_version":2,"id":"stt-async-preview-v1","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Async Preview v1","one_way_translation":"all_languages","supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":false,"transcription_mode":"async","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":"stt-rt-v4","context_version":2,"id":"stt-rt-v3","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Real-time v3","one_way_translation":"all_languages","supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":true,"transcription_mode":"real_time","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":"stt-async-v4","context_version":2,"id":"stt-async-v3","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Async v3","one_way_translation":"all_languages","supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":false,"transcription_mode":"async","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]}]}
+ /// Example: {"models":[{"aliased_model_id":null,"context_version":2,"endpoint_latency_adjustment_max_level":3,"id":"stt-rt-v5","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Real-time v5","one_way_translation":"all_languages","supports_endpoint_latency_adjustment":true,"supports_endpoint_sensitivity":true,"supports_language_hints_strict":true,"supports_max_endpoint_delay":true,"transcription_mode":"real_time","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":null,"context_version":2,"endpoint_latency_adjustment_max_level":0,"id":"stt-rt-v4","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Real-time v4","one_way_translation":"all_languages","supports_endpoint_latency_adjustment":false,"supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":true,"transcription_mode":"real_time","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":null,"context_version":2,"endpoint_latency_adjustment_max_level":0,"id":"stt-async-v5","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Async v5","one_way_translation":"all_languages","supports_endpoint_latency_adjustment":false,"supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":false,"transcription_mode":"async","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":null,"context_version":2,"endpoint_latency_adjustment_max_level":0,"id":"stt-async-v4","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Async v4","one_way_translation":"all_languages","supports_endpoint_latency_adjustment":false,"supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":false,"transcription_mode":"async","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":"stt-rt-v4","context_version":2,"endpoint_latency_adjustment_max_level":0,"id":"stt-rt-preview","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Real-time Preview","one_way_translation":"all_languages","supports_endpoint_latency_adjustment":false,"supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":true,"transcription_mode":"real_time","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":"stt-async-v4","context_version":2,"endpoint_latency_adjustment_max_level":0,"id":"stt-async-preview","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Async Preview","one_way_translation":"all_languages","supports_endpoint_latency_adjustment":false,"supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":false,"transcription_mode":"async","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":"stt-rt-v4","context_version":2,"endpoint_latency_adjustment_max_level":0,"id":"stt-rt-v3-preview","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Real-time v3 Preview","one_way_translation":"all_languages","supports_endpoint_latency_adjustment":false,"supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":true,"transcription_mode":"real_time","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":"stt-rt-v4","context_version":2,"endpoint_latency_adjustment_max_level":0,"id":"stt-rt-preview-v2","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Real-time Preview v2","one_way_translation":"all_languages","supports_endpoint_latency_adjustment":false,"supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":true,"transcription_mode":"real_time","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":"stt-async-v4","context_version":2,"endpoint_latency_adjustment_max_level":0,"id":"stt-async-preview-v1","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Async Preview v1","one_way_translation":"all_languages","supports_endpoint_latency_adjustment":false,"supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":false,"transcription_mode":"async","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":"stt-rt-v4","context_version":2,"endpoint_latency_adjustment_max_level":0,"id":"stt-rt-v3","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Real-time v3","one_way_translation":"all_languages","supports_endpoint_latency_adjustment":false,"supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":true,"transcription_mode":"real_time","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]},{"aliased_model_id":"stt-async-v4","context_version":2,"endpoint_latency_adjustment_max_level":0,"id":"stt-async-v3","languages":[{"code":"af","name":"Afrikaans"},{"code":"sq","name":"Albanian"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"eu","name":"Basque"},{"code":"be","name":"Belarusian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"bg","name":"Bulgarian"},{"code":"ca","name":"Catalan"},{"code":"zh","name":"Chinese"},{"code":"hr","name":"Croatian"},{"code":"cs","name":"Czech"},{"code":"da","name":"Danish"},{"code":"nl","name":"Dutch"},{"code":"en","name":"English"},{"code":"et","name":"Estonian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kn","name":"Kannada"},{"code":"kk","name":"Kazakh"},{"code":"ko","name":"Korean"},{"code":"lv","name":"Latvian"},{"code":"lt","name":"Lithuanian"},{"code":"mk","name":"Macedonian"},{"code":"ms","name":"Malay"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"no","name":"Norwegian"},{"code":"fa","name":"Persian"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"pa","name":"Punjabi"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sr","name":"Serbian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"es","name":"Spanish"},{"code":"sw","name":"Swahili"},{"code":"sv","name":"Swedish"},{"code":"tl","name":"Tagalog"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"vi","name":"Vietnamese"},{"code":"cy","name":"Welsh"}],"name":"Speech-to-Text Async v3","one_way_translation":"all_languages","supports_endpoint_latency_adjustment":false,"supports_endpoint_sensitivity":false,"supports_language_hints_strict":true,"supports_max_endpoint_delay":false,"transcription_mode":"async","translation_targets":[],"two_way_translation":"all_languages","two_way_translation_pairs":[]}]}
///
public sealed partial class GetModelsResponse
{
diff --git a/src/libs/Soniox/Generated/Soniox.Models.GetTTSModelsResponse.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetTTSModelsResponse.g.cs
index dcd5124..6cbcd29 100644
--- a/src/libs/Soniox/Generated/Soniox.Models.GetTTSModelsResponse.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetTTSModelsResponse.g.cs
@@ -4,7 +4,7 @@
namespace Soniox
{
///
- /// Example: {"models":[{"aliased_model_id":null,"id":"tts-rt-v1","languages":[{"code":"af","name":"Afrikaans"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"be","name":"Belarusian"},{"code":"bg","name":"Bulgarian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"ca","name":"Catalan"},{"code":"cs","name":"Czech"},{"code":"cy","name":"Welsh"},{"code":"da","name":"Danish"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"en","name":"English"},{"code":"es","name":"Spanish"},{"code":"et","name":"Estonian"},{"code":"eu","name":"Basque"},{"code":"fa","name":"Persian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hr","name":"Croatian"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"is","name":"Icelandic"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kk","name":"Kazakh"},{"code":"kn","name":"Kannada"},{"code":"ko","name":"Korean"},{"code":"lt","name":"Lithuanian"},{"code":"lv","name":"Latvian"},{"code":"mk","name":"Macedonian"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"ms","name":"Malay"},{"code":"nl","name":"Dutch"},{"code":"no","name":"Norwegian"},{"code":"pa","name":"Punjabi"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"sq","name":"Albanian"},{"code":"sr","name":"Serbian"},{"code":"su","name":"Sundanese"},{"code":"sv","name":"Swedish"},{"code":"sw","name":"Swahili"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tl","name":"Tagalog"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"uz","name":"Uzbek"},{"code":"vi","name":"Vietnamese"},{"code":"zh","name":"Chinese"}],"name":"TTS RT v1","voices":[{"description":"A steady, clear voice with a natural presence and measured delivery that feels confident, warm, and easy to listen to.","gender":"female","id":"Maya"},{"description":"A rich, steady male voice with a polished tone, controlled pacing, and a reassuring presence that feels confident and mature.","gender":"male","id":"Daniel"},{"description":"A lively, youthful male voice with crisp clarity, quick natural pacing, and an upbeat tone that feels friendly, expressive, and modern.","gender":"male","id":"Noah"},{"description":"A bright, expressive female voice with youthful energy, natural rhythm, and a friendly tone that feels warm, engaging, and full of personality.","gender":"female","id":"Nina"},{"description":"A smooth, natural female voice with a relaxed pace, subtle warmth, and a contemporary tone that feels confident, personable, and easygoing.","gender":"female","id":"Emma"},{"description":"A friendly, confident male voice with clear articulation, steady energy, and a natural tone that feels approachable, upbeat, and sincere.","gender":"male","id":"Jack"},{"description":"A deep, focused male voice with crisp articulation, measured pacing, and a composed tone that feels authoritative, clear, and professional.","gender":"male","id":"Adrian"},{"description":"A polished, articulate female voice with a bright tone, smooth pacing, and a confident presence that feels refined, clear, and approachable.","gender":"female","id":"Claire"},{"description":"A gentle, soothing female voice with soft clarity, unhurried pacing, and a reassuring tone that feels kind, calm, and comforting.","gender":"female","id":"Grace"},{"description":"A grounded male voice with even pacing and a dry, composed tone that feels steady, natural, and quietly confident.","gender":"male","id":"Owen"},{"description":"A soft, thoughtful female voice with gentle clarity, steady pacing, and a warm tone that feels composed, sincere, and easy to listen to.","gender":"female","id":"Mina"},{"description":"A calm, precise male voice with smooth clarity, balanced pacing, and a composed tone that feels respectful, modern, and trustworthy.","gender":"male","id":"Kenji"},{"description":"A clear, composed male voice with a warm Spanish accent, balanced pacing, and a confident tone that feels approachable and precise.","gender":"male","id":"Rafael"},{"description":"A warm, youthful male voice with a soft Spanish accent, clear pacing, and an open tone that feels sincere, friendly, and optimistic.","gender":"male","id":"Mateo"},{"description":"A clear, mature female voice with a natural Spanish accent, steady pacing, and a composed tone that feels warm, focused, and approachable.","gender":"female","id":"Lucia"},{"description":"A bright, friendly female voice with a natural Spanish accent, clear articulation, and an inviting tone that feels warm, confident, and easy to follow.","gender":"female","id":"Sofia"},{"description":"A refined male voice with a smooth British accent, gentle pacing, and a calm tone that feels trustworthy, articulate, and reassuring.","gender":"male","id":"Oliver"},{"description":"A deep, mature male voice with a rich British accent, measured pacing, and a textured tone that feels composed, assured, and quietly powerful.","gender":"male","id":"Arthur"},{"description":"A lively female voice with a bright British accent, clear delivery, and expressive energy that feels fresh, friendly, and naturally engaging.","gender":"female","id":"Isla"},{"description":"A poised female voice with a refined British accent, smooth pacing, and a lightly textured tone that feels elegant, confident, and composed.","gender":"female","id":"Victoria"},{"description":"A bold male voice with a strong Australian accent, relaxed pacing, and a casual tone that feels confident, rugged, and easygoing.","gender":"male","id":"Cooper"},{"description":"A relaxed male voice with a natural Australian accent, smooth pacing, and a casual tone that feels friendly, grounded, and effortlessly confident.","gender":"male","id":"Mason"},{"description":"A confident female voice with a natural Australian accent, lively pacing, and a warm tone that feels personable, sharp, and engaging.","gender":"female","id":"Ruby"},{"description":"A warm female voice with a natural Australian accent, clear pronunciation, and a confident tone that feels supportive, polished, and easy to follow.","gender":"female","id":"Elise"},{"description":"A deep male voice with a natural Indian accent, warm resonance, and an easygoing tone that feels friendly, grounded, and confident.","gender":"male","id":"Arjun"},{"description":"A lively male voice with a natural Indian accent, expressive rhythm, and confident energy that feels charismatic, upbeat, and full of personality.","gender":"male","id":"Rohan"},{"description":"A clear female voice with a natural Indian accent, warm pacing, and a composed tone that feels helpful, attentive, and easy to trust.","gender":"female","id":"Priya"},{"description":"A polished female voice with a natural Indian accent, crisp articulation, and a steady tone that feels professional, reassuring, and dependable.","gender":"female","id":"Meera"}]},{"aliased_model_id":"tts-rt-v1","id":"tts-rt-v1-preview","languages":[{"code":"af","name":"Afrikaans"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"be","name":"Belarusian"},{"code":"bg","name":"Bulgarian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"ca","name":"Catalan"},{"code":"cs","name":"Czech"},{"code":"cy","name":"Welsh"},{"code":"da","name":"Danish"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"en","name":"English"},{"code":"es","name":"Spanish"},{"code":"et","name":"Estonian"},{"code":"eu","name":"Basque"},{"code":"fa","name":"Persian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hr","name":"Croatian"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"is","name":"Icelandic"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kk","name":"Kazakh"},{"code":"kn","name":"Kannada"},{"code":"ko","name":"Korean"},{"code":"lt","name":"Lithuanian"},{"code":"lv","name":"Latvian"},{"code":"mk","name":"Macedonian"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"ms","name":"Malay"},{"code":"nl","name":"Dutch"},{"code":"no","name":"Norwegian"},{"code":"pa","name":"Punjabi"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"sq","name":"Albanian"},{"code":"sr","name":"Serbian"},{"code":"su","name":"Sundanese"},{"code":"sv","name":"Swedish"},{"code":"sw","name":"Swahili"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tl","name":"Tagalog"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"uz","name":"Uzbek"},{"code":"vi","name":"Vietnamese"},{"code":"zh","name":"Chinese"}],"name":"TTS RT v1 Preview","voices":[{"description":"A steady, clear voice with a natural presence and measured delivery that feels confident, warm, and easy to listen to.","gender":"female","id":"Maya"},{"description":"A rich, steady male voice with a polished tone, controlled pacing, and a reassuring presence that feels confident and mature.","gender":"male","id":"Daniel"},{"description":"A lively, youthful male voice with crisp clarity, quick natural pacing, and an upbeat tone that feels friendly, expressive, and modern.","gender":"male","id":"Noah"},{"description":"A bright, expressive female voice with youthful energy, natural rhythm, and a friendly tone that feels warm, engaging, and full of personality.","gender":"female","id":"Nina"},{"description":"A smooth, natural female voice with a relaxed pace, subtle warmth, and a contemporary tone that feels confident, personable, and easygoing.","gender":"female","id":"Emma"},{"description":"A friendly, confident male voice with clear articulation, steady energy, and a natural tone that feels approachable, upbeat, and sincere.","gender":"male","id":"Jack"},{"description":"A deep, focused male voice with crisp articulation, measured pacing, and a composed tone that feels authoritative, clear, and professional.","gender":"male","id":"Adrian"},{"description":"A polished, articulate female voice with a bright tone, smooth pacing, and a confident presence that feels refined, clear, and approachable.","gender":"female","id":"Claire"},{"description":"A gentle, soothing female voice with soft clarity, unhurried pacing, and a reassuring tone that feels kind, calm, and comforting.","gender":"female","id":"Grace"},{"description":"A grounded male voice with even pacing and a dry, composed tone that feels steady, natural, and quietly confident.","gender":"male","id":"Owen"},{"description":"A soft, thoughtful female voice with gentle clarity, steady pacing, and a warm tone that feels composed, sincere, and easy to listen to.","gender":"female","id":"Mina"},{"description":"A calm, precise male voice with smooth clarity, balanced pacing, and a composed tone that feels respectful, modern, and trustworthy.","gender":"male","id":"Kenji"},{"description":"A clear, composed male voice with a warm Spanish accent, balanced pacing, and a confident tone that feels approachable and precise.","gender":"male","id":"Rafael"},{"description":"A warm, youthful male voice with a soft Spanish accent, clear pacing, and an open tone that feels sincere, friendly, and optimistic.","gender":"male","id":"Mateo"},{"description":"A clear, mature female voice with a natural Spanish accent, steady pacing, and a composed tone that feels warm, focused, and approachable.","gender":"female","id":"Lucia"},{"description":"A bright, friendly female voice with a natural Spanish accent, clear articulation, and an inviting tone that feels warm, confident, and easy to follow.","gender":"female","id":"Sofia"},{"description":"A refined male voice with a smooth British accent, gentle pacing, and a calm tone that feels trustworthy, articulate, and reassuring.","gender":"male","id":"Oliver"},{"description":"A deep, mature male voice with a rich British accent, measured pacing, and a textured tone that feels composed, assured, and quietly powerful.","gender":"male","id":"Arthur"},{"description":"A lively female voice with a bright British accent, clear delivery, and expressive energy that feels fresh, friendly, and naturally engaging.","gender":"female","id":"Isla"},{"description":"A poised female voice with a refined British accent, smooth pacing, and a lightly textured tone that feels elegant, confident, and composed.","gender":"female","id":"Victoria"},{"description":"A bold male voice with a strong Australian accent, relaxed pacing, and a casual tone that feels confident, rugged, and easygoing.","gender":"male","id":"Cooper"},{"description":"A relaxed male voice with a natural Australian accent, smooth pacing, and a casual tone that feels friendly, grounded, and effortlessly confident.","gender":"male","id":"Mason"},{"description":"A confident female voice with a natural Australian accent, lively pacing, and a warm tone that feels personable, sharp, and engaging.","gender":"female","id":"Ruby"},{"description":"A warm female voice with a natural Australian accent, clear pronunciation, and a confident tone that feels supportive, polished, and easy to follow.","gender":"female","id":"Elise"},{"description":"A deep male voice with a natural Indian accent, warm resonance, and an easygoing tone that feels friendly, grounded, and confident.","gender":"male","id":"Arjun"},{"description":"A lively male voice with a natural Indian accent, expressive rhythm, and confident energy that feels charismatic, upbeat, and full of personality.","gender":"male","id":"Rohan"},{"description":"A clear female voice with a natural Indian accent, warm pacing, and a composed tone that feels helpful, attentive, and easy to trust.","gender":"female","id":"Priya"},{"description":"A polished female voice with a natural Indian accent, crisp articulation, and a steady tone that feels professional, reassuring, and dependable.","gender":"female","id":"Meera"}]}]}
+ /// Example: {"models":[{"aliased_model_id":null,"id":"tts-rt-v1","languages":[{"code":"af","name":"Afrikaans"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"be","name":"Belarusian"},{"code":"bg","name":"Bulgarian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"ca","name":"Catalan"},{"code":"cs","name":"Czech"},{"code":"cy","name":"Welsh"},{"code":"da","name":"Danish"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"en","name":"English"},{"code":"es","name":"Spanish"},{"code":"et","name":"Estonian"},{"code":"eu","name":"Basque"},{"code":"fa","name":"Persian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hr","name":"Croatian"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"is","name":"Icelandic"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kk","name":"Kazakh"},{"code":"kn","name":"Kannada"},{"code":"ko","name":"Korean"},{"code":"lt","name":"Lithuanian"},{"code":"lv","name":"Latvian"},{"code":"mk","name":"Macedonian"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"ms","name":"Malay"},{"code":"nl","name":"Dutch"},{"code":"no","name":"Norwegian"},{"code":"pa","name":"Punjabi"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"sq","name":"Albanian"},{"code":"sr","name":"Serbian"},{"code":"su","name":"Sundanese"},{"code":"sv","name":"Swedish"},{"code":"sw","name":"Swahili"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tl","name":"Tagalog"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"uz","name":"Uzbek"},{"code":"vi","name":"Vietnamese"},{"code":"zh","name":"Chinese"}],"name":"TTS RT v1","speed_max":null,"speed_min":null,"supports_speed_adjustment":false,"supports_timestamps":false,"supports_voice_cloning":false,"voices":[{"description":"A steady, clear voice with a natural presence and measured delivery that feels confident, warm, and easy to listen to.","gender":"female","id":"Maya"},{"description":"A rich, steady male voice with a polished tone, controlled pacing, and a reassuring presence that feels confident and mature.","gender":"male","id":"Daniel"},{"description":"A lively, youthful male voice with crisp clarity, quick natural pacing, and an upbeat tone that feels friendly, expressive, and modern.","gender":"male","id":"Noah"},{"description":"A bright, expressive female voice with youthful energy, natural rhythm, and a friendly tone that feels warm, engaging, and full of personality.","gender":"female","id":"Nina"},{"description":"A smooth, natural female voice with a relaxed pace, subtle warmth, and a contemporary tone that feels confident, personable, and easygoing.","gender":"female","id":"Emma"},{"description":"A friendly, confident male voice with clear articulation, steady energy, and a natural tone that feels approachable, upbeat, and sincere.","gender":"male","id":"Jack"},{"description":"A deep, focused male voice with crisp articulation, measured pacing, and a composed tone that feels authoritative, clear, and professional.","gender":"male","id":"Adrian"},{"description":"A polished, articulate female voice with a bright tone, smooth pacing, and a confident presence that feels refined, clear, and approachable.","gender":"female","id":"Claire"},{"description":"A gentle, soothing female voice with soft clarity, unhurried pacing, and a reassuring tone that feels kind, calm, and comforting.","gender":"female","id":"Grace"},{"description":"A grounded male voice with even pacing and a dry, composed tone that feels steady, natural, and quietly confident.","gender":"male","id":"Owen"},{"description":"A soft, thoughtful female voice with gentle clarity, steady pacing, and a warm tone that feels composed, sincere, and easy to listen to.","gender":"female","id":"Mina"},{"description":"A calm, precise male voice with smooth clarity, balanced pacing, and a composed tone that feels respectful, modern, and trustworthy.","gender":"male","id":"Kenji"},{"description":"A clear, composed male voice with a warm Spanish accent, balanced pacing, and a confident tone that feels approachable and precise.","gender":"male","id":"Rafael"},{"description":"A warm, youthful male voice with a soft Spanish accent, clear pacing, and an open tone that feels sincere, friendly, and optimistic.","gender":"male","id":"Mateo"},{"description":"A clear, mature female voice with a natural Spanish accent, steady pacing, and a composed tone that feels warm, focused, and approachable.","gender":"female","id":"Lucia"},{"description":"A bright, friendly female voice with a natural Spanish accent, clear articulation, and an inviting tone that feels warm, confident, and easy to follow.","gender":"female","id":"Sofia"},{"description":"A refined male voice with a smooth British accent, gentle pacing, and a calm tone that feels trustworthy, articulate, and reassuring.","gender":"male","id":"Oliver"},{"description":"A deep, mature male voice with a rich British accent, measured pacing, and a textured tone that feels composed, assured, and quietly powerful.","gender":"male","id":"Arthur"},{"description":"A lively female voice with a bright British accent, clear delivery, and expressive energy that feels fresh, friendly, and naturally engaging.","gender":"female","id":"Isla"},{"description":"A poised female voice with a refined British accent, smooth pacing, and a lightly textured tone that feels elegant, confident, and composed.","gender":"female","id":"Victoria"},{"description":"A bold male voice with a strong Australian accent, relaxed pacing, and a casual tone that feels confident, rugged, and easygoing.","gender":"male","id":"Cooper"},{"description":"A relaxed male voice with a natural Australian accent, smooth pacing, and a casual tone that feels friendly, grounded, and effortlessly confident.","gender":"male","id":"Mason"},{"description":"A confident female voice with a natural Australian accent, lively pacing, and a warm tone that feels personable, sharp, and engaging.","gender":"female","id":"Ruby"},{"description":"A warm female voice with a natural Australian accent, clear pronunciation, and a confident tone that feels supportive, polished, and easy to follow.","gender":"female","id":"Elise"},{"description":"A deep male voice with a natural Indian accent, warm resonance, and an easygoing tone that feels friendly, grounded, and confident.","gender":"male","id":"Arjun"},{"description":"A lively male voice with a natural Indian accent, expressive rhythm, and confident energy that feels charismatic, upbeat, and full of personality.","gender":"male","id":"Rohan"},{"description":"A clear female voice with a natural Indian accent, warm pacing, and a composed tone that feels helpful, attentive, and easy to trust.","gender":"female","id":"Priya"},{"description":"A polished female voice with a natural Indian accent, crisp articulation, and a steady tone that feels professional, reassuring, and dependable.","gender":"female","id":"Meera"}]},{"aliased_model_id":"tts-rt-v1","id":"tts-rt-v1-preview","languages":[{"code":"af","name":"Afrikaans"},{"code":"ar","name":"Arabic"},{"code":"az","name":"Azerbaijani"},{"code":"be","name":"Belarusian"},{"code":"bg","name":"Bulgarian"},{"code":"bn","name":"Bengali"},{"code":"bs","name":"Bosnian"},{"code":"ca","name":"Catalan"},{"code":"cs","name":"Czech"},{"code":"cy","name":"Welsh"},{"code":"da","name":"Danish"},{"code":"de","name":"German"},{"code":"el","name":"Greek"},{"code":"en","name":"English"},{"code":"es","name":"Spanish"},{"code":"et","name":"Estonian"},{"code":"eu","name":"Basque"},{"code":"fa","name":"Persian"},{"code":"fi","name":"Finnish"},{"code":"fr","name":"French"},{"code":"gl","name":"Galician"},{"code":"gu","name":"Gujarati"},{"code":"he","name":"Hebrew"},{"code":"hi","name":"Hindi"},{"code":"hr","name":"Croatian"},{"code":"hu","name":"Hungarian"},{"code":"id","name":"Indonesian"},{"code":"is","name":"Icelandic"},{"code":"it","name":"Italian"},{"code":"ja","name":"Japanese"},{"code":"kk","name":"Kazakh"},{"code":"kn","name":"Kannada"},{"code":"ko","name":"Korean"},{"code":"lt","name":"Lithuanian"},{"code":"lv","name":"Latvian"},{"code":"mk","name":"Macedonian"},{"code":"ml","name":"Malayalam"},{"code":"mr","name":"Marathi"},{"code":"ms","name":"Malay"},{"code":"nl","name":"Dutch"},{"code":"no","name":"Norwegian"},{"code":"pa","name":"Punjabi"},{"code":"pl","name":"Polish"},{"code":"pt","name":"Portuguese"},{"code":"ro","name":"Romanian"},{"code":"ru","name":"Russian"},{"code":"sk","name":"Slovak"},{"code":"sl","name":"Slovenian"},{"code":"sq","name":"Albanian"},{"code":"sr","name":"Serbian"},{"code":"su","name":"Sundanese"},{"code":"sv","name":"Swedish"},{"code":"sw","name":"Swahili"},{"code":"ta","name":"Tamil"},{"code":"te","name":"Telugu"},{"code":"th","name":"Thai"},{"code":"tl","name":"Tagalog"},{"code":"tr","name":"Turkish"},{"code":"uk","name":"Ukrainian"},{"code":"ur","name":"Urdu"},{"code":"uz","name":"Uzbek"},{"code":"vi","name":"Vietnamese"},{"code":"zh","name":"Chinese"}],"name":"TTS RT v1 Preview","speed_max":null,"speed_min":null,"supports_speed_adjustment":false,"supports_timestamps":false,"supports_voice_cloning":false,"voices":[{"description":"A steady, clear voice with a natural presence and measured delivery that feels confident, warm, and easy to listen to.","gender":"female","id":"Maya"},{"description":"A rich, steady male voice with a polished tone, controlled pacing, and a reassuring presence that feels confident and mature.","gender":"male","id":"Daniel"},{"description":"A lively, youthful male voice with crisp clarity, quick natural pacing, and an upbeat tone that feels friendly, expressive, and modern.","gender":"male","id":"Noah"},{"description":"A bright, expressive female voice with youthful energy, natural rhythm, and a friendly tone that feels warm, engaging, and full of personality.","gender":"female","id":"Nina"},{"description":"A smooth, natural female voice with a relaxed pace, subtle warmth, and a contemporary tone that feels confident, personable, and easygoing.","gender":"female","id":"Emma"},{"description":"A friendly, confident male voice with clear articulation, steady energy, and a natural tone that feels approachable, upbeat, and sincere.","gender":"male","id":"Jack"},{"description":"A deep, focused male voice with crisp articulation, measured pacing, and a composed tone that feels authoritative, clear, and professional.","gender":"male","id":"Adrian"},{"description":"A polished, articulate female voice with a bright tone, smooth pacing, and a confident presence that feels refined, clear, and approachable.","gender":"female","id":"Claire"},{"description":"A gentle, soothing female voice with soft clarity, unhurried pacing, and a reassuring tone that feels kind, calm, and comforting.","gender":"female","id":"Grace"},{"description":"A grounded male voice with even pacing and a dry, composed tone that feels steady, natural, and quietly confident.","gender":"male","id":"Owen"},{"description":"A soft, thoughtful female voice with gentle clarity, steady pacing, and a warm tone that feels composed, sincere, and easy to listen to.","gender":"female","id":"Mina"},{"description":"A calm, precise male voice with smooth clarity, balanced pacing, and a composed tone that feels respectful, modern, and trustworthy.","gender":"male","id":"Kenji"},{"description":"A clear, composed male voice with a warm Spanish accent, balanced pacing, and a confident tone that feels approachable and precise.","gender":"male","id":"Rafael"},{"description":"A warm, youthful male voice with a soft Spanish accent, clear pacing, and an open tone that feels sincere, friendly, and optimistic.","gender":"male","id":"Mateo"},{"description":"A clear, mature female voice with a natural Spanish accent, steady pacing, and a composed tone that feels warm, focused, and approachable.","gender":"female","id":"Lucia"},{"description":"A bright, friendly female voice with a natural Spanish accent, clear articulation, and an inviting tone that feels warm, confident, and easy to follow.","gender":"female","id":"Sofia"},{"description":"A refined male voice with a smooth British accent, gentle pacing, and a calm tone that feels trustworthy, articulate, and reassuring.","gender":"male","id":"Oliver"},{"description":"A deep, mature male voice with a rich British accent, measured pacing, and a textured tone that feels composed, assured, and quietly powerful.","gender":"male","id":"Arthur"},{"description":"A lively female voice with a bright British accent, clear delivery, and expressive energy that feels fresh, friendly, and naturally engaging.","gender":"female","id":"Isla"},{"description":"A poised female voice with a refined British accent, smooth pacing, and a lightly textured tone that feels elegant, confident, and composed.","gender":"female","id":"Victoria"},{"description":"A bold male voice with a strong Australian accent, relaxed pacing, and a casual tone that feels confident, rugged, and easygoing.","gender":"male","id":"Cooper"},{"description":"A relaxed male voice with a natural Australian accent, smooth pacing, and a casual tone that feels friendly, grounded, and effortlessly confident.","gender":"male","id":"Mason"},{"description":"A confident female voice with a natural Australian accent, lively pacing, and a warm tone that feels personable, sharp, and engaging.","gender":"female","id":"Ruby"},{"description":"A warm female voice with a natural Australian accent, clear pronunciation, and a confident tone that feels supportive, polished, and easy to follow.","gender":"female","id":"Elise"},{"description":"A deep male voice with a natural Indian accent, warm resonance, and an easygoing tone that feels friendly, grounded, and confident.","gender":"male","id":"Arjun"},{"description":"A lively male voice with a natural Indian accent, expressive rhythm, and confident energy that feels charismatic, upbeat, and full of personality.","gender":"male","id":"Rohan"},{"description":"A clear female voice with a natural Indian accent, warm pacing, and a composed tone that feels helpful, attentive, and easy to trust.","gender":"female","id":"Priya"},{"description":"A polished female voice with a natural Indian accent, crisp articulation, and a steady tone that feels professional, reassuring, and dependable.","gender":"female","id":"Meera"}]}]}
///
public sealed partial class GetTTSModelsResponse
{
diff --git a/src/libs/Soniox/Generated/Soniox.Models.GetVoicesCountResponse.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesCountResponse.Json.g.cs
new file mode 100644
index 0000000..ad0c754
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesCountResponse.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class GetVoicesCountResponse
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Soniox.GetVoicesCountResponse? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.GetVoicesCountResponse),
+ jsonSerializerContext) as global::Soniox.GetVoicesCountResponse;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.GetVoicesCountResponse? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Soniox.GetVoicesCountResponse? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Soniox.GetVoicesCountResponse),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.GetVoicesCountResponse;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.GetVoicesCountResponse.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesCountResponse.g.cs
new file mode 100644
index 0000000..cc8d70c
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesCountResponse.g.cs
@@ -0,0 +1,47 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ ///
+ ///
+ public sealed partial class GetVoicesCountResponse
+ {
+ ///
+ /// Total number of voices in your project.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("total")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int Total { get; set; }
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// Total number of voices in your project.
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public GetVoicesCountResponse(
+ int total)
+ {
+ this.Total = total;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetVoicesCountResponse()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.GetVoicesCursor.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesCursor.Json.g.cs
new file mode 100644
index 0000000..1978f19
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesCursor.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class GetVoicesCursor
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Soniox.GetVoicesCursor? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.GetVoicesCursor),
+ jsonSerializerContext) as global::Soniox.GetVoicesCursor;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.GetVoicesCursor? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Soniox.GetVoicesCursor? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Soniox.GetVoicesCursor),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.GetVoicesCursor;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.GetVoicesCursor.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesCursor.g.cs
new file mode 100644
index 0000000..03fe6ec
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesCursor.g.cs
@@ -0,0 +1,19 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ /// Pagination cursor for the next page of results.
+ ///
+ public sealed partial class GetVoicesCursor
+ {
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.GetVoicesPayload.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesPayload.Json.g.cs
new file mode 100644
index 0000000..71d7b10
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesPayload.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class GetVoicesPayload
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Soniox.GetVoicesPayload? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.GetVoicesPayload),
+ jsonSerializerContext) as global::Soniox.GetVoicesPayload;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.GetVoicesPayload? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Soniox.GetVoicesPayload? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Soniox.GetVoicesPayload),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.GetVoicesPayload;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.GetVoicesPayload.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesPayload.g.cs
new file mode 100644
index 0000000..63ac29d
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesPayload.g.cs
@@ -0,0 +1,59 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ ///
+ ///
+ public sealed partial class GetVoicesPayload
+ {
+ ///
+ /// Maximum number of voices to return.
+ /// Default Value: 1000
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("limit")]
+ public int? Limit { get; set; }
+
+ ///
+ /// Pagination cursor for the next page of results.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("cursor")]
+ public string? Cursor { get; set; }
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// Maximum number of voices to return.
+ /// Default Value: 1000
+ ///
+ ///
+ /// Pagination cursor for the next page of results.
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public GetVoicesPayload(
+ int? limit,
+ string? cursor)
+ {
+ this.Limit = limit;
+ this.Cursor = cursor;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetVoicesPayload()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.GetVoicesPayloadCursor.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesPayloadCursor.Json.g.cs
new file mode 100644
index 0000000..6ffd97e
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesPayloadCursor.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class GetVoicesPayloadCursor
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Soniox.GetVoicesPayloadCursor? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.GetVoicesPayloadCursor),
+ jsonSerializerContext) as global::Soniox.GetVoicesPayloadCursor;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.GetVoicesPayloadCursor? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Soniox.GetVoicesPayloadCursor? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Soniox.GetVoicesPayloadCursor),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.GetVoicesPayloadCursor;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.GetVoicesPayloadCursor.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesPayloadCursor.g.cs
new file mode 100644
index 0000000..e547900
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesPayloadCursor.g.cs
@@ -0,0 +1,19 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ /// Pagination cursor for the next page of results.
+ ///
+ public sealed partial class GetVoicesPayloadCursor
+ {
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.GetVoicesResponse.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesResponse.Json.g.cs
new file mode 100644
index 0000000..34f9968
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesResponse.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class GetVoicesResponse
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Soniox.GetVoicesResponse? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.GetVoicesResponse),
+ jsonSerializerContext) as global::Soniox.GetVoicesResponse;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.GetVoicesResponse? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Soniox.GetVoicesResponse? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Soniox.GetVoicesResponse),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.GetVoicesResponse;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.GetVoicesResponse.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesResponse.g.cs
new file mode 100644
index 0000000..efe531d
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesResponse.g.cs
@@ -0,0 +1,58 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ ///
+ ///
+ public sealed partial class GetVoicesResponse
+ {
+ ///
+ /// List of voices.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("voices")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList Voices { get; set; }
+
+ ///
+ /// A pagination token that references the next page of results. When more data is available, this field contains a value to pass in the cursor parameter of a subsequent request. When null, no additional results are available.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("next_page_cursor")]
+ public string? NextPageCursor { get; set; }
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// List of voices.
+ ///
+ ///
+ /// A pagination token that references the next page of results. When more data is available, this field contains a value to pass in the cursor parameter of a subsequent request. When null, no additional results are available.
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public GetVoicesResponse(
+ global::System.Collections.Generic.IList voices,
+ string? nextPageCursor)
+ {
+ this.Voices = voices ?? throw new global::System.ArgumentNullException(nameof(voices));
+ this.NextPageCursor = nextPageCursor;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetVoicesResponse()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.GetVoicesResponseNextPageCursor.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesResponseNextPageCursor.Json.g.cs
new file mode 100644
index 0000000..a94a83d
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesResponseNextPageCursor.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class GetVoicesResponseNextPageCursor
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Soniox.GetVoicesResponseNextPageCursor? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.GetVoicesResponseNextPageCursor),
+ jsonSerializerContext) as global::Soniox.GetVoicesResponseNextPageCursor;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.GetVoicesResponseNextPageCursor? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Soniox.GetVoicesResponseNextPageCursor? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Soniox.GetVoicesResponseNextPageCursor),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.GetVoicesResponseNextPageCursor;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.GetVoicesResponseNextPageCursor.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesResponseNextPageCursor.g.cs
new file mode 100644
index 0000000..8801c7b
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetVoicesResponseNextPageCursor.g.cs
@@ -0,0 +1,19 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ /// A pagination token that references the next page of results. When more data is available, this field contains a value to pass in the cursor parameter of a subsequent request. When null, no additional results are available.
+ ///
+ public sealed partial class GetVoicesResponseNextPageCursor
+ {
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.Model.g.cs b/src/libs/Soniox/Generated/Soniox.Models.Model.g.cs
index 7880100..89b9bf8 100644
--- a/src/libs/Soniox/Generated/Soniox.Models.Model.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Models.Model.g.cs
@@ -70,6 +70,20 @@ public sealed partial class Model
[global::System.Text.Json.Serialization.JsonRequired]
public required bool SupportsEndpointSensitivity { get; set; }
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("supports_endpoint_latency_adjustment")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required bool SupportsEndpointLatencyAdjustment { get; set; }
+
+ ///
+ /// Maximum endpoint_latency_adjustment_level the model accepts. Valid levels are 0 (no adjustment) through this value; 0 means the feature is unsupported.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("endpoint_latency_adjustment_max_level")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int EndpointLatencyAdjustmentMaxLevel { get; set; }
+
///
/// List of supported one-way translation targets. If list is empty, check for one_way_translation field
///
@@ -120,6 +134,10 @@ public sealed partial class Model
///
///
///
+ ///
+ ///
+ /// Maximum endpoint_latency_adjustment_level the model accepts. Valid levels are 0 (no adjustment) through this value; 0 means the feature is unsupported.
+ ///
///
/// List of supported one-way translation targets. If list is empty, check for one_way_translation field
///
@@ -149,6 +167,8 @@ public Model(
bool supportsLanguageHintsStrict,
bool supportsMaxEndpointDelay,
bool supportsEndpointSensitivity,
+ bool supportsEndpointLatencyAdjustment,
+ int endpointLatencyAdjustmentMaxLevel,
global::System.Collections.Generic.IList translationTargets,
global::System.Collections.Generic.IList twoWayTranslationPairs,
string? aliasedModelId,
@@ -165,6 +185,8 @@ public Model(
this.SupportsLanguageHintsStrict = supportsLanguageHintsStrict;
this.SupportsMaxEndpointDelay = supportsMaxEndpointDelay;
this.SupportsEndpointSensitivity = supportsEndpointSensitivity;
+ this.SupportsEndpointLatencyAdjustment = supportsEndpointLatencyAdjustment;
+ this.EndpointLatencyAdjustmentMaxLevel = endpointLatencyAdjustmentMaxLevel;
this.TranslationTargets = translationTargets ?? throw new global::System.ArgumentNullException(nameof(translationTargets));
this.TwoWayTranslationPairs = twoWayTranslationPairs ?? throw new global::System.ArgumentNullException(nameof(twoWayTranslationPairs));
this.OneWayTranslation = oneWayTranslation;
diff --git a/src/libs/Soniox/Generated/Soniox.Models.RecomputeVoicePayload.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.RecomputeVoicePayload.Json.g.cs
new file mode 100644
index 0000000..96f5b7e
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.RecomputeVoicePayload.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class RecomputeVoicePayload
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Soniox.RecomputeVoicePayload? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.RecomputeVoicePayload),
+ jsonSerializerContext) as global::Soniox.RecomputeVoicePayload;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.RecomputeVoicePayload? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Soniox.RecomputeVoicePayload? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Soniox.RecomputeVoicePayload),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.RecomputeVoicePayload;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.RecomputeVoicePayload.g.cs b/src/libs/Soniox/Generated/Soniox.Models.RecomputeVoicePayload.g.cs
new file mode 100644
index 0000000..31142db
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.RecomputeVoicePayload.g.cs
@@ -0,0 +1,46 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ ///
+ ///
+ public sealed partial class RecomputeVoicePayload
+ {
+ ///
+ /// The model to prepare this voice for. If omitted, the voice is prepared for every available model it is not ready for yet.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("model")]
+ public string? Model { get; set; }
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// The model to prepare this voice for. If omitted, the voice is prepared for every available model it is not ready for yet.
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public RecomputeVoicePayload(
+ string? model)
+ {
+ this.Model = model;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public RecomputeVoicePayload()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.RecomputeVoicePayloadModel.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.RecomputeVoicePayloadModel.Json.g.cs
new file mode 100644
index 0000000..a509add
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.RecomputeVoicePayloadModel.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class RecomputeVoicePayloadModel
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Soniox.RecomputeVoicePayloadModel? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.RecomputeVoicePayloadModel),
+ jsonSerializerContext) as global::Soniox.RecomputeVoicePayloadModel;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.RecomputeVoicePayloadModel? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Soniox.RecomputeVoicePayloadModel? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Soniox.RecomputeVoicePayloadModel),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.RecomputeVoicePayloadModel;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.RecomputeVoicePayloadModel.g.cs b/src/libs/Soniox/Generated/Soniox.Models.RecomputeVoicePayloadModel.g.cs
new file mode 100644
index 0000000..ebe37a6
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.RecomputeVoicePayloadModel.g.cs
@@ -0,0 +1,19 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ /// The model to prepare this voice for. If omitted, the voice is prepared for every available model it is not ready for yet.
+ ///
+ public sealed partial class RecomputeVoicePayloadModel
+ {
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.TTSModel.g.cs b/src/libs/Soniox/Generated/Soniox.Models.TTSModel.g.cs
index bbe06bd..494e5da 100644
--- a/src/libs/Soniox/Generated/Soniox.Models.TTSModel.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Models.TTSModel.g.cs
@@ -42,6 +42,39 @@ public sealed partial class TTSModel
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.Collections.Generic.IList Languages { get; set; }
+ ///
+ /// Whether the model supports returning timestamps for generated audio.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("supports_timestamps")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required bool SupportsTimestamps { get; set; }
+
+ ///
+ /// Whether the model supports voice cloning (custom voices).
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("supports_voice_cloning")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required bool SupportsVoiceCloning { get; set; }
+
+ ///
+ /// Whether the model supports adjusting the speech speed.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("supports_speed_adjustment")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required bool SupportsSpeedAdjustment { get; set; }
+
+ ///
+ /// Minimum supported speech speed. Null when the model does not support speed adjustment.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("speed_min")]
+ public double? SpeedMin { get; set; }
+
+ ///
+ /// Maximum supported speech speed. Null when the model does not support speed adjustment.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("speed_max")]
+ public double? SpeedMax { get; set; }
+
///
/// Additional properties that are not explicitly defined in the schema
///
@@ -63,9 +96,24 @@ public sealed partial class TTSModel
///
/// List of languages supported by the model.
///
+ ///
+ /// Whether the model supports returning timestamps for generated audio.
+ ///
+ ///
+ /// Whether the model supports voice cloning (custom voices).
+ ///
+ ///
+ /// Whether the model supports adjusting the speech speed.
+ ///
///
/// If this is an alias, the id of the aliased model.
///
+ ///
+ /// Minimum supported speech speed. Null when the model does not support speed adjustment.
+ ///
+ ///
+ /// Maximum supported speech speed. Null when the model does not support speed adjustment.
+ ///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
@@ -74,13 +122,23 @@ public TTSModel(
string name,
global::System.Collections.Generic.IList voices,
global::System.Collections.Generic.IList languages,
- string? aliasedModelId)
+ bool supportsTimestamps,
+ bool supportsVoiceCloning,
+ bool supportsSpeedAdjustment,
+ string? aliasedModelId,
+ double? speedMin,
+ double? speedMax)
{
this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id));
this.AliasedModelId = aliasedModelId;
this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name));
this.Voices = voices ?? throw new global::System.ArgumentNullException(nameof(voices));
this.Languages = languages ?? throw new global::System.ArgumentNullException(nameof(languages));
+ this.SupportsTimestamps = supportsTimestamps;
+ this.SupportsVoiceCloning = supportsVoiceCloning;
+ this.SupportsSpeedAdjustment = supportsSpeedAdjustment;
+ this.SpeedMin = speedMin;
+ this.SpeedMax = speedMax;
}
///
diff --git a/src/libs/Soniox/Generated/Soniox.Models.TTSModelSpeedMax.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.TTSModelSpeedMax.Json.g.cs
new file mode 100644
index 0000000..9b66d32
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.TTSModelSpeedMax.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class TTSModelSpeedMax
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Soniox.TTSModelSpeedMax? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.TTSModelSpeedMax),
+ jsonSerializerContext) as global::Soniox.TTSModelSpeedMax;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.TTSModelSpeedMax? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Soniox.TTSModelSpeedMax? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Soniox.TTSModelSpeedMax),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.TTSModelSpeedMax;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.TTSModelSpeedMax.g.cs b/src/libs/Soniox/Generated/Soniox.Models.TTSModelSpeedMax.g.cs
new file mode 100644
index 0000000..ecae0ab
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.TTSModelSpeedMax.g.cs
@@ -0,0 +1,19 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ /// Maximum supported speech speed. Null when the model does not support speed adjustment.
+ ///
+ public sealed partial class TTSModelSpeedMax
+ {
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.TTSModelSpeedMin.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.TTSModelSpeedMin.Json.g.cs
new file mode 100644
index 0000000..ad04044
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.TTSModelSpeedMin.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class TTSModelSpeedMin
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Soniox.TTSModelSpeedMin? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.TTSModelSpeedMin),
+ jsonSerializerContext) as global::Soniox.TTSModelSpeedMin;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.TTSModelSpeedMin? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Soniox.TTSModelSpeedMin? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Soniox.TTSModelSpeedMin),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.TTSModelSpeedMin;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.TTSModelSpeedMin.g.cs b/src/libs/Soniox/Generated/Soniox.Models.TTSModelSpeedMin.g.cs
new file mode 100644
index 0000000..8c17b54
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.TTSModelSpeedMin.g.cs
@@ -0,0 +1,19 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ /// Minimum supported speech speed. Null when the model does not support speed adjustment.
+ ///
+ public sealed partial class TTSModelSpeedMin
+ {
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.UploadVoicePayload.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.UploadVoicePayload.Json.g.cs
new file mode 100644
index 0000000..810e910
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.UploadVoicePayload.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class UploadVoicePayload
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Soniox.UploadVoicePayload? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.UploadVoicePayload),
+ jsonSerializerContext) as global::Soniox.UploadVoicePayload;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.UploadVoicePayload? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Soniox.UploadVoicePayload? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Soniox.UploadVoicePayload),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.UploadVoicePayload;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.UploadVoicePayload.g.cs b/src/libs/Soniox/Generated/Soniox.Models.UploadVoicePayload.g.cs
new file mode 100644
index 0000000..e6f26ca
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.UploadVoicePayload.g.cs
@@ -0,0 +1,47 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ ///
+ ///
+ public sealed partial class UploadVoicePayload
+ {
+ ///
+ /// A name for the voice, unique within your project.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Name { get; set; }
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// A name for the voice, unique within your project.
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public UploadVoicePayload(
+ string name)
+ {
+ this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name));
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public UploadVoicePayload()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.Voice.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.Voice.Json.g.cs
new file mode 100644
index 0000000..fa25911
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.Voice.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class Voice
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Soniox.Voice? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.Voice),
+ jsonSerializerContext) as global::Soniox.Voice;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.Voice? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Soniox.Voice? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Soniox.Voice),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.Voice;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.Voice.g.cs b/src/libs/Soniox/Generated/Soniox.Models.Voice.g.cs
new file mode 100644
index 0000000..68723d6
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.Voice.g.cs
@@ -0,0 +1,95 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ ///
+ ///
+ public sealed partial class Voice
+ {
+ ///
+ /// Unique identifier of the voice.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Guid Id { get; set; }
+
+ ///
+ /// Name of the voice.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Name { get; set; }
+
+ ///
+ /// Original file name of the uploaded audio clip.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("filename")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Filename { get; set; }
+
+ ///
+ /// UTC timestamp indicating when the voice was created.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("created_at")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.DateTime CreatedAt { get; set; }
+
+ ///
+ /// Voice status for each available model. A model with status 'not_computed' is not prepared yet (e.g. it was released after the voice was created); call recompute to prepare the voice for it.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("models")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList Models { get; set; }
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// Unique identifier of the voice.
+ ///
+ ///
+ /// Name of the voice.
+ ///
+ ///
+ /// Original file name of the uploaded audio clip.
+ ///
+ ///
+ /// UTC timestamp indicating when the voice was created.
+ ///
+ ///
+ /// Voice status for each available model. A model with status 'not_computed' is not prepared yet (e.g. it was released after the voice was created); call recompute to prepare the voice for it.
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public Voice(
+ global::System.Guid id,
+ string name,
+ string filename,
+ global::System.DateTime createdAt,
+ global::System.Collections.Generic.IList models)
+ {
+ this.Id = id;
+ this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name));
+ this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename));
+ this.CreatedAt = createdAt;
+ this.Models = models ?? throw new global::System.ArgumentNullException(nameof(models));
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public Voice()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.VoiceModel.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.VoiceModel.Json.g.cs
new file mode 100644
index 0000000..43f35f0
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.VoiceModel.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class VoiceModel
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Soniox.VoiceModel? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.VoiceModel),
+ jsonSerializerContext) as global::Soniox.VoiceModel;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.VoiceModel? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Soniox.VoiceModel? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Soniox.VoiceModel),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.VoiceModel;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.VoiceModel.g.cs b/src/libs/Soniox/Generated/Soniox.Models.VoiceModel.g.cs
new file mode 100644
index 0000000..db09466
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.VoiceModel.g.cs
@@ -0,0 +1,82 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ ///
+ ///
+ public sealed partial class VoiceModel
+ {
+ ///
+ /// Name of the model.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("model")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Model { get; set; }
+
+ ///
+ /// Has to be 'ready' for the voice to be usable with this model.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("status")]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Soniox.JsonConverters.VoiceModelStatusJsonConverter))]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::Soniox.VoiceModelStatus Status { get; set; }
+
+ ///
+ /// Machine-readable error category when status is 'failed'. Stable across releases — safe to use in control flow. `null` otherwise.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("error_type")]
+ public string? ErrorType { get; set; }
+
+ ///
+ /// Human-readable error message when status is 'failed' (e.g. the reference audio is too long). `null` otherwise.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("error_message")]
+ public string? ErrorMessage { get; set; }
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// Name of the model.
+ ///
+ ///
+ /// Has to be 'ready' for the voice to be usable with this model.
+ ///
+ ///
+ /// Machine-readable error category when status is 'failed'. Stable across releases — safe to use in control flow. `null` otherwise.
+ ///
+ ///
+ /// Human-readable error message when status is 'failed' (e.g. the reference audio is too long). `null` otherwise.
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public VoiceModel(
+ string model,
+ global::Soniox.VoiceModelStatus status,
+ string? errorType,
+ string? errorMessage)
+ {
+ this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model));
+ this.Status = status;
+ this.ErrorType = errorType;
+ this.ErrorMessage = errorMessage;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public VoiceModel()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.VoiceModelErrorMessage.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.VoiceModelErrorMessage.Json.g.cs
new file mode 100644
index 0000000..0ef604f
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.VoiceModelErrorMessage.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class VoiceModelErrorMessage
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Soniox.VoiceModelErrorMessage? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.VoiceModelErrorMessage),
+ jsonSerializerContext) as global::Soniox.VoiceModelErrorMessage;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.VoiceModelErrorMessage? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Soniox.VoiceModelErrorMessage? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Soniox.VoiceModelErrorMessage),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.VoiceModelErrorMessage;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.VoiceModelErrorMessage.g.cs b/src/libs/Soniox/Generated/Soniox.Models.VoiceModelErrorMessage.g.cs
new file mode 100644
index 0000000..e37c426
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.VoiceModelErrorMessage.g.cs
@@ -0,0 +1,19 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ /// Human-readable error message when status is 'failed' (e.g. the reference audio is too long). `null` otherwise.
+ ///
+ public sealed partial class VoiceModelErrorMessage
+ {
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.VoiceModelErrorType.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.VoiceModelErrorType.Json.g.cs
new file mode 100644
index 0000000..aee9a58
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.VoiceModelErrorType.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class VoiceModelErrorType
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
+ ///
+ public string ToJson()
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return ToJson(global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Soniox.VoiceModelErrorType? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.VoiceModelErrorType),
+ jsonSerializerContext) as global::Soniox.VoiceModelErrorType;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.VoiceModelErrorType? FromJson(
+ string json)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Soniox.VoiceModelErrorType? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJson(
+ json,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Soniox.VoiceModelErrorType),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.VoiceModelErrorType;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the generated default JsonSerializerContext.
+ ///
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ if (jsonSerializerOptions is null)
+ {
+ return FromJsonStreamAsync(
+ jsonStream,
+ global::Soniox.SourceGenerationContext.Default);
+ }
+
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.VoiceModelErrorType.g.cs b/src/libs/Soniox/Generated/Soniox.Models.VoiceModelErrorType.g.cs
new file mode 100644
index 0000000..4600d83
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.VoiceModelErrorType.g.cs
@@ -0,0 +1,19 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ /// Machine-readable error category when status is 'failed'. Stable across releases — safe to use in control flow. `null` otherwise.
+ ///
+ public sealed partial class VoiceModelErrorType
+ {
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.VoiceModelStatus.g.cs b/src/libs/Soniox/Generated/Soniox.Models.VoiceModelStatus.g.cs
new file mode 100644
index 0000000..ea3a76e
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.VoiceModelStatus.g.cs
@@ -0,0 +1,63 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ ///
+ ///
+ public enum VoiceModelStatus
+ {
+ ///
+ ///
+ ///
+ Failed,
+ ///
+ ///
+ ///
+ NotComputed,
+ ///
+ ///
+ ///
+ Processing,
+ ///
+ ///
+ ///
+ Ready,
+ }
+
+ ///
+ /// Enum extensions to do fast conversions without the reflection.
+ ///
+ public static class VoiceModelStatusExtensions
+ {
+ ///
+ /// Converts an enum to a string.
+ ///
+ public static string ToValueString(this VoiceModelStatus value)
+ {
+ return value switch
+ {
+ VoiceModelStatus.Failed => "failed",
+ VoiceModelStatus.NotComputed => "not_computed",
+ VoiceModelStatus.Processing => "processing",
+ VoiceModelStatus.Ready => "ready",
+ _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
+ };
+ }
+ ///
+ /// Converts an string to a enum.
+ ///
+ public static VoiceModelStatus? ToEnum(string value)
+ {
+ return value switch
+ {
+ "failed" => VoiceModelStatus.Failed,
+ "not_computed" => VoiceModelStatus.NotComputed,
+ "processing" => VoiceModelStatus.Processing,
+ "ready" => VoiceModelStatus.Ready,
+ _ => null,
+ };
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.SonioxClient.g.cs b/src/libs/Soniox/Generated/Soniox.SonioxClient.g.cs
index 9c67e56..2222f2b 100644
--- a/src/libs/Soniox/Generated/Soniox.SonioxClient.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.SonioxClient.g.cs
@@ -102,6 +102,15 @@ public sealed partial class SonioxClient : global::Soniox.ISonioxClient, global:
JsonSerializerContext = JsonSerializerContext,
};
+ ///
+ ///
+ ///
+ public VoicesClient Voices => new VoicesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
+ {
+ ReadResponseAsString = ReadResponseAsString,
+ JsonSerializerContext = JsonSerializerContext,
+ };
+
///
/// Creates a new instance of the SonioxClient.
/// If no httpClient is provided, a new one will be created.
diff --git a/src/libs/Soniox/Generated/Soniox.VoicesClient.CreateVoice.g.cs b/src/libs/Soniox/Generated/Soniox.VoicesClient.CreateVoice.g.cs
new file mode 100644
index 0000000..b9b017c
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.VoicesClient.CreateVoice.g.cs
@@ -0,0 +1,1908 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ public partial class VoicesClient
+ {
+
+
+ private static readonly global::Soniox.EndPointSecurityRequirement s_CreateVoiceSecurityRequirement0 =
+ new global::Soniox.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Soniox.EndPointAuthorizationRequirement[]
+ { new global::Soniox.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Soniox.EndPointSecurityRequirement[] s_CreateVoiceSecurityRequirements =
+ new global::Soniox.EndPointSecurityRequirement[]
+ { s_CreateVoiceSecurityRequirement0,
+ };
+ partial void PrepareCreateVoiceArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ global::Soniox.CreateVoiceRequest request);
+ partial void PrepareCreateVoiceRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::Soniox.CreateVoiceRequest request);
+ partial void ProcessCreateVoiceResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessCreateVoiceResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Create voice
+ /// Uploads a reference audio clip and creates a new voice.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task CreateVoiceAsync(
+
+ global::Soniox.CreateVoiceRequest request,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateVoiceAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create voice
+ /// Uploads a reference audio clip and creates a new voice.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> CreateVoiceAsResponseAsync(
+
+ global::Soniox.CreateVoiceRequest request,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareCreateVoiceArguments(
+ httpClient: HttpClient,
+ request: request);
+
+
+ var __authorizations = global::Soniox.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_CreateVoiceSecurityRequirements,
+ operationName: "CreateVoiceAsync");
+
+ using var __timeoutCancellationTokenSource = global::Soniox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Soniox.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Soniox.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: false);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Soniox.PathBuilder(
+ path: "/v1/voices",
+ baseUri: HttpClient.BaseAddress);
+ var __path = __pathBuilder.ToString();
+ __path = global::Soniox.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+
+ var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
+ __httpRequestContent.Add(
+ content: new global::System.Net.Http.StringContent(request.Name ?? string.Empty),
+ name: "\"name\"");
+
+ var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty());
+ __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue(
+ request.Filename is null
+ ? "application/octet-stream"
+ : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch
+ {
+ ".aac" => "audio/aac",
+ ".flac" => "audio/flac",
+ ".gif" => "image/gif",
+ ".jpeg" => "image/jpeg",
+ ".jpg" => "image/jpeg",
+ ".json" => "application/json",
+ ".m4a" => "audio/mp4",
+ ".mp3" => "audio/mpeg",
+ ".mp4" => "video/mp4",
+ ".mpeg" => "audio/mpeg",
+ ".mpga" => "audio/mpeg",
+ ".oga" => "audio/ogg",
+ ".ogg" => "audio/ogg",
+ ".opus" => "audio/ogg",
+ ".pdf" => "application/pdf",
+ ".png" => "image/png",
+ ".txt" => "text/plain",
+ ".wav" => "audio/wav",
+ ".weba" => "audio/webm",
+ ".webm" => "video/webm",
+ ".webp" => "image/webp",
+ _ => "application/octet-stream",
+ });
+ __httpRequestContent.Add(
+ content: __contentFile,
+ name: "\"file\"",
+ fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty);
+ if (__contentFile.Headers.ContentDisposition != null)
+ {
+ __contentFile.Headers.ContentDisposition.FileNameStar = null;
+ }
+
+ __httpRequest.Content = __httpRequestContent;
+
+ global::Soniox.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareCreateVoiceRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateVoice",
+ methodName: "CreateVoiceAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Soniox.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateVoice",
+ methodName: "CreateVoiceAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Soniox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Soniox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Soniox.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateVoice",
+ methodName: "CreateVoiceAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Soniox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessCreateVoiceResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateVoice",
+ methodName: "CreateVoiceAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateVoice",
+ methodName: "CreateVoiceAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Bad Request
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::Soniox.ApiError? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::Soniox.ApiError.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::Soniox.ApiError.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::Soniox.ApiError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::Soniox.ApiError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::Soniox.ApiError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Conflict
+ if ((int)__response.StatusCode == 409)
+ {
+ string? __content_409 = null;
+ global::System.Exception? __exception_409 = null;
+ global::Soniox.ApiError? __value_409 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_409 = global::Soniox.ApiError.FromJson(__content_409, JsonSerializerContext);
+ }
+ else
+ {
+ __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_409 = global::Soniox.ApiError.FromJson(__content_409, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_409 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_409 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_409,
+ responseBody: __content_409,
+ responseObject: __value_409,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Too Many Requests
+ if ((int)__response.StatusCode == 429)
+ {
+ string? __content_429 = null;
+ global::System.Exception? __exception_429 = null;
+ global::Soniox.ApiError? __value_429 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_429 = global::Soniox.ApiError.FromJson(__content_429, JsonSerializerContext);
+ }
+ else
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_429 = global::Soniox.ApiError.FromJson(__content_429, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_429 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_429 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_429,
+ responseBody: __content_429,
+ responseObject: __value_429,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Internal Server Error
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::Soniox.ApiError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::Soniox.ApiError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::Soniox.ApiError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessCreateVoiceResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Soniox.Voice.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Soniox.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Soniox.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Soniox.Voice.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Soniox.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Soniox.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Create voice
+ /// Uploads a reference audio clip and creates a new voice.
+ ///
+ ///
+ /// A name for the voice, unique within your project.
+ ///
+ ///
+ /// The reference audio clip for the voice.
+ ///
+ ///
+ /// The reference audio clip for the voice.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task CreateVoiceAsync(
+ string name,
+ byte[] file,
+ string filename,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Soniox.CreateVoiceRequest
+ {
+ Name = name,
+ File = file,
+ Filename = filename,
+ };
+
+ return await CreateVoiceAsync(
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Create voice
+ /// Uploads a reference audio clip and creates a new voice.
+ ///
+ ///
+ /// A name for the voice, unique within your project.
+ ///
+ ///
+ /// The reference audio clip for the voice.
+ ///
+ ///
+ /// The reference audio clip for the voice.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task CreateVoiceAsync(
+ string name,
+ global::System.IO.Stream file,
+ string filename,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+
+ file = file ?? throw new global::System.ArgumentNullException(nameof(file));
+ var request = new global::Soniox.CreateVoiceRequest
+ {
+ Name = name,
+ File = global::System.Array.Empty(),
+ Filename = filename,
+ };
+ PrepareArguments(
+ client: HttpClient);
+ PrepareCreateVoiceArguments(
+ httpClient: HttpClient,
+ request: request);
+
+
+ var __authorizations = global::Soniox.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_CreateVoiceSecurityRequirements,
+ operationName: "CreateVoiceAsync");
+
+ using var __timeoutCancellationTokenSource = global::Soniox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Soniox.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Soniox.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: false);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Soniox.PathBuilder(
+ path: "/v1/voices",
+ baseUri: HttpClient.BaseAddress);
+ var __path = __pathBuilder.ToString();
+ __path = global::Soniox.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+
+ var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
+ __httpRequestContent.Add(
+ content: new global::System.Net.Http.StringContent(request.Name ?? string.Empty),
+ name: "\"name\"");
+
+ var __contentFile = new global::System.Net.Http.StreamContent(file);
+ __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue(
+ request.Filename is null
+ ? "application/octet-stream"
+ : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch
+ {
+ ".aac" => "audio/aac",
+ ".flac" => "audio/flac",
+ ".gif" => "image/gif",
+ ".jpeg" => "image/jpeg",
+ ".jpg" => "image/jpeg",
+ ".json" => "application/json",
+ ".m4a" => "audio/mp4",
+ ".mp3" => "audio/mpeg",
+ ".mp4" => "video/mp4",
+ ".mpeg" => "audio/mpeg",
+ ".mpga" => "audio/mpeg",
+ ".oga" => "audio/ogg",
+ ".ogg" => "audio/ogg",
+ ".opus" => "audio/ogg",
+ ".pdf" => "application/pdf",
+ ".png" => "image/png",
+ ".txt" => "text/plain",
+ ".wav" => "audio/wav",
+ ".weba" => "audio/webm",
+ ".webm" => "video/webm",
+ ".webp" => "image/webp",
+ _ => "application/octet-stream",
+ });
+ __httpRequestContent.Add(
+ content: __contentFile,
+ name: "\"file\"",
+ fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty);
+ if (__contentFile.Headers.ContentDisposition != null)
+ {
+ __contentFile.Headers.ContentDisposition.FileNameStar = null;
+ }
+
+ __httpRequest.Content = __httpRequestContent;
+
+ global::Soniox.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareCreateVoiceRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateVoice",
+ methodName: "CreateVoiceAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Soniox.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateVoice",
+ methodName: "CreateVoiceAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Soniox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Soniox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Soniox.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateVoice",
+ methodName: "CreateVoiceAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Soniox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessCreateVoiceResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateVoice",
+ methodName: "CreateVoiceAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateVoice",
+ methodName: "CreateVoiceAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Bad Request
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::Soniox.ApiError? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::Soniox.ApiError.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::Soniox.ApiError.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::Soniox.ApiError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::Soniox.ApiError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::Soniox.ApiError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Conflict
+ if ((int)__response.StatusCode == 409)
+ {
+ string? __content_409 = null;
+ global::System.Exception? __exception_409 = null;
+ global::Soniox.ApiError? __value_409 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_409 = global::Soniox.ApiError.FromJson(__content_409, JsonSerializerContext);
+ }
+ else
+ {
+ __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_409 = global::Soniox.ApiError.FromJson(__content_409, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_409 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_409 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_409,
+ responseBody: __content_409,
+ responseObject: __value_409,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Too Many Requests
+ if ((int)__response.StatusCode == 429)
+ {
+ string? __content_429 = null;
+ global::System.Exception? __exception_429 = null;
+ global::Soniox.ApiError? __value_429 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_429 = global::Soniox.ApiError.FromJson(__content_429, JsonSerializerContext);
+ }
+ else
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_429 = global::Soniox.ApiError.FromJson(__content_429, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_429 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_429 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_429,
+ responseBody: __content_429,
+ responseObject: __value_429,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Internal Server Error
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::Soniox.ApiError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::Soniox.ApiError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::Soniox.ApiError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessCreateVoiceResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return
+ global::Soniox.Voice.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ return
+ await global::Soniox.Voice.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Create voice
+ /// Uploads a reference audio clip and creates a new voice.
+ ///
+ ///
+ /// A name for the voice, unique within your project.
+ ///
+ ///
+ /// The reference audio clip for the voice.
+ ///
+ ///
+ /// The reference audio clip for the voice.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> CreateVoiceAsResponseAsync(
+ string name,
+ global::System.IO.Stream file,
+ string filename,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+
+ file = file ?? throw new global::System.ArgumentNullException(nameof(file));
+ var request = new global::Soniox.CreateVoiceRequest
+ {
+ Name = name,
+ File = global::System.Array.Empty(),
+ Filename = filename,
+ };
+ PrepareArguments(
+ client: HttpClient);
+ PrepareCreateVoiceArguments(
+ httpClient: HttpClient,
+ request: request);
+
+
+ var __authorizations = global::Soniox.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_CreateVoiceSecurityRequirements,
+ operationName: "CreateVoiceAsync");
+
+ using var __timeoutCancellationTokenSource = global::Soniox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Soniox.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Soniox.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: false);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Soniox.PathBuilder(
+ path: "/v1/voices",
+ baseUri: HttpClient.BaseAddress);
+ var __path = __pathBuilder.ToString();
+ __path = global::Soniox.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+
+ var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
+ __httpRequestContent.Add(
+ content: new global::System.Net.Http.StringContent(request.Name ?? string.Empty),
+ name: "\"name\"");
+
+ var __contentFile = new global::System.Net.Http.StreamContent(file);
+ __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue(
+ request.Filename is null
+ ? "application/octet-stream"
+ : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch
+ {
+ ".aac" => "audio/aac",
+ ".flac" => "audio/flac",
+ ".gif" => "image/gif",
+ ".jpeg" => "image/jpeg",
+ ".jpg" => "image/jpeg",
+ ".json" => "application/json",
+ ".m4a" => "audio/mp4",
+ ".mp3" => "audio/mpeg",
+ ".mp4" => "video/mp4",
+ ".mpeg" => "audio/mpeg",
+ ".mpga" => "audio/mpeg",
+ ".oga" => "audio/ogg",
+ ".ogg" => "audio/ogg",
+ ".opus" => "audio/ogg",
+ ".pdf" => "application/pdf",
+ ".png" => "image/png",
+ ".txt" => "text/plain",
+ ".wav" => "audio/wav",
+ ".weba" => "audio/webm",
+ ".webm" => "video/webm",
+ ".webp" => "image/webp",
+ _ => "application/octet-stream",
+ });
+ __httpRequestContent.Add(
+ content: __contentFile,
+ name: "\"file\"",
+ fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty);
+ if (__contentFile.Headers.ContentDisposition != null)
+ {
+ __contentFile.Headers.ContentDisposition.FileNameStar = null;
+ }
+
+ __httpRequest.Content = __httpRequestContent;
+
+ global::Soniox.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareCreateVoiceRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateVoice",
+ methodName: "CreateVoiceAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Soniox.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateVoice",
+ methodName: "CreateVoiceAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Soniox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Soniox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Soniox.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateVoice",
+ methodName: "CreateVoiceAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Soniox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessCreateVoiceResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateVoice",
+ methodName: "CreateVoiceAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateVoice",
+ methodName: "CreateVoiceAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Bad Request
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::Soniox.ApiError? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::Soniox.ApiError.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::Soniox.ApiError.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::Soniox.ApiError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::Soniox.ApiError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::Soniox.ApiError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Conflict
+ if ((int)__response.StatusCode == 409)
+ {
+ string? __content_409 = null;
+ global::System.Exception? __exception_409 = null;
+ global::Soniox.ApiError? __value_409 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_409 = global::Soniox.ApiError.FromJson(__content_409, JsonSerializerContext);
+ }
+ else
+ {
+ __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_409 = global::Soniox.ApiError.FromJson(__content_409, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_409 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_409 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_409,
+ responseBody: __content_409,
+ responseObject: __value_409,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Too Many Requests
+ if ((int)__response.StatusCode == 429)
+ {
+ string? __content_429 = null;
+ global::System.Exception? __exception_429 = null;
+ global::Soniox.ApiError? __value_429 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_429 = global::Soniox.ApiError.FromJson(__content_429, JsonSerializerContext);
+ }
+ else
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_429 = global::Soniox.ApiError.FromJson(__content_429, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_429 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_429 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_429,
+ responseBody: __content_429,
+ responseObject: __value_429,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Internal Server Error
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::Soniox.ApiError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::Soniox.ApiError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::Soniox.ApiError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessCreateVoiceResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Soniox.Voice.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Soniox.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Soniox.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Soniox.Voice.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Soniox.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Soniox.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.VoicesClient.DeleteVoice.g.cs b/src/libs/Soniox/Generated/Soniox.VoicesClient.DeleteVoice.g.cs
new file mode 100644
index 0000000..a834ae4
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.VoicesClient.DeleteVoice.g.cs
@@ -0,0 +1,551 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ public partial class VoicesClient
+ {
+
+
+ private static readonly global::Soniox.EndPointSecurityRequirement s_DeleteVoiceSecurityRequirement0 =
+ new global::Soniox.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Soniox.EndPointAuthorizationRequirement[]
+ { new global::Soniox.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Soniox.EndPointSecurityRequirement[] s_DeleteVoiceSecurityRequirements =
+ new global::Soniox.EndPointSecurityRequirement[]
+ { s_DeleteVoiceSecurityRequirement0,
+ };
+ partial void PrepareDeleteVoiceArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref global::System.Guid voiceId);
+ partial void PrepareDeleteVoiceRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::System.Guid voiceId);
+ partial void ProcessDeleteVoiceResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ ///
+ /// Delete voice
+ /// Permanently deletes the specified voice and its embeddings.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task DeleteVoiceAsync(
+ global::System.Guid voiceId,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteVoiceAsResponseAsync(
+ voiceId: voiceId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete voice
+ /// Permanently deletes the specified voice and its embeddings.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task DeleteVoiceAsResponseAsync(
+ global::System.Guid voiceId,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareDeleteVoiceArguments(
+ httpClient: HttpClient,
+ voiceId: ref voiceId);
+
+
+ var __authorizations = global::Soniox.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_DeleteVoiceSecurityRequirements,
+ operationName: "DeleteVoiceAsync");
+
+ using var __timeoutCancellationTokenSource = global::Soniox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Soniox.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Soniox.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Soniox.PathBuilder(
+ path: $"/v1/voices/{voiceId}",
+ baseUri: HttpClient.BaseAddress);
+ var __path = __pathBuilder.ToString();
+ __path = global::Soniox.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Delete,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Soniox.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareDeleteVoiceRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ voiceId: voiceId!);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DeleteVoice",
+ methodName: "DeleteVoiceAsync",
+ pathTemplate: "$\"/v1/voices/{voiceId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Soniox.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DeleteVoice",
+ methodName: "DeleteVoiceAsync",
+ pathTemplate: "$\"/v1/voices/{voiceId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Soniox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Soniox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Soniox.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DeleteVoice",
+ methodName: "DeleteVoiceAsync",
+ pathTemplate: "$\"/v1/voices/{voiceId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Soniox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessDeleteVoiceResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DeleteVoice",
+ methodName: "DeleteVoiceAsync",
+ pathTemplate: "$\"/v1/voices/{voiceId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DeleteVoice",
+ methodName: "DeleteVoiceAsync",
+ pathTemplate: "$\"/v1/voices/{voiceId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::Soniox.ApiError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::Soniox.ApiError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::Soniox.ApiError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Not Found
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::Soniox.ApiError? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::Soniox.ApiError.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::Soniox.ApiError.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ responseBody: __content_404,
+ responseObject: __value_404,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Too Many Requests
+ if ((int)__response.StatusCode == 429)
+ {
+ string? __content_429 = null;
+ global::System.Exception? __exception_429 = null;
+ global::Soniox.ApiError? __value_429 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_429 = global::Soniox.ApiError.FromJson(__content_429, JsonSerializerContext);
+ }
+ else
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_429 = global::Soniox.ApiError.FromJson(__content_429, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_429 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_429 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_429,
+ responseBody: __content_429,
+ responseObject: __value_429,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Internal Server Error
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::Soniox.ApiError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::Soniox.ApiError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::Soniox.ApiError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return new global::Soniox.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Soniox.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ return new global::Soniox.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Soniox.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.VoicesClient.GetVoice.g.cs b/src/libs/Soniox/Generated/Soniox.VoicesClient.GetVoice.g.cs
new file mode 100644
index 0000000..370e14c
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.VoicesClient.GetVoice.g.cs
@@ -0,0 +1,574 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ public partial class VoicesClient
+ {
+
+
+ private static readonly global::Soniox.EndPointSecurityRequirement s_GetVoiceSecurityRequirement0 =
+ new global::Soniox.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Soniox.EndPointAuthorizationRequirement[]
+ { new global::Soniox.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Soniox.EndPointSecurityRequirement[] s_GetVoiceSecurityRequirements =
+ new global::Soniox.EndPointSecurityRequirement[]
+ { s_GetVoiceSecurityRequirement0,
+ };
+ partial void PrepareGetVoiceArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref global::System.Guid voiceId);
+ partial void PrepareGetVoiceRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::System.Guid voiceId);
+ partial void ProcessGetVoiceResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetVoiceResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get voice
+ /// Retrieve metadata for a voice.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task GetVoiceAsync(
+ global::System.Guid voiceId,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetVoiceAsResponseAsync(
+ voiceId: voiceId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get voice
+ /// Retrieve metadata for a voice.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetVoiceAsResponseAsync(
+ global::System.Guid voiceId,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetVoiceArguments(
+ httpClient: HttpClient,
+ voiceId: ref voiceId);
+
+
+ var __authorizations = global::Soniox.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetVoiceSecurityRequirements,
+ operationName: "GetVoiceAsync");
+
+ using var __timeoutCancellationTokenSource = global::Soniox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Soniox.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Soniox.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Soniox.PathBuilder(
+ path: $"/v1/voices/{voiceId}",
+ baseUri: HttpClient.BaseAddress);
+ var __path = __pathBuilder.ToString();
+ __path = global::Soniox.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Soniox.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetVoiceRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ voiceId: voiceId!);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetVoice",
+ methodName: "GetVoiceAsync",
+ pathTemplate: "$\"/v1/voices/{voiceId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Soniox.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetVoice",
+ methodName: "GetVoiceAsync",
+ pathTemplate: "$\"/v1/voices/{voiceId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Soniox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Soniox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Soniox.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetVoice",
+ methodName: "GetVoiceAsync",
+ pathTemplate: "$\"/v1/voices/{voiceId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Soniox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetVoiceResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetVoice",
+ methodName: "GetVoiceAsync",
+ pathTemplate: "$\"/v1/voices/{voiceId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetVoice",
+ methodName: "GetVoiceAsync",
+ pathTemplate: "$\"/v1/voices/{voiceId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::Soniox.ApiError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::Soniox.ApiError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::Soniox.ApiError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Not Found
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::Soniox.ApiError? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::Soniox.ApiError.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::Soniox.ApiError.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ responseBody: __content_404,
+ responseObject: __value_404,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Too Many Requests
+ if ((int)__response.StatusCode == 429)
+ {
+ string? __content_429 = null;
+ global::System.Exception? __exception_429 = null;
+ global::Soniox.ApiError? __value_429 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_429 = global::Soniox.ApiError.FromJson(__content_429, JsonSerializerContext);
+ }
+ else
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_429 = global::Soniox.ApiError.FromJson(__content_429, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_429 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_429 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_429,
+ responseBody: __content_429,
+ responseObject: __value_429,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Internal Server Error
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::Soniox.ApiError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::Soniox.ApiError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::Soniox.ApiError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetVoiceResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Soniox.Voice.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Soniox.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Soniox.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Soniox.Voice.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Soniox.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Soniox.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.VoicesClient.GetVoices.g.cs b/src/libs/Soniox/Generated/Soniox.VoicesClient.GetVoices.g.cs
new file mode 100644
index 0000000..a4d02ed
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.VoicesClient.GetVoices.g.cs
@@ -0,0 +1,597 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ public partial class VoicesClient
+ {
+
+
+ private static readonly global::Soniox.EndPointSecurityRequirement s_GetVoicesSecurityRequirement0 =
+ new global::Soniox.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Soniox.EndPointAuthorizationRequirement[]
+ { new global::Soniox.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Soniox.EndPointSecurityRequirement[] s_GetVoicesSecurityRequirements =
+ new global::Soniox.EndPointSecurityRequirement[]
+ { s_GetVoicesSecurityRequirement0,
+ };
+ partial void PrepareGetVoicesArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref int? limit,
+ ref string? cursor);
+ partial void PrepareGetVoicesRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ int? limit,
+ string? cursor);
+ partial void ProcessGetVoicesResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetVoicesResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get voices
+ /// Retrieves the list of voices in your project.
+ ///
+ ///
+ /// Maximum number of voices to return.
+ /// Default Value: 1000
+ ///
+ ///
+ /// Pagination cursor for the next page of results.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task GetVoicesAsync(
+ int? limit = default,
+ string? cursor = default,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetVoicesAsResponseAsync(
+ limit: limit,
+ cursor: cursor,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get voices
+ /// Retrieves the list of voices in your project.
+ ///
+ ///
+ /// Maximum number of voices to return.
+ /// Default Value: 1000
+ ///
+ ///
+ /// Pagination cursor for the next page of results.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetVoicesAsResponseAsync(
+ int? limit = default,
+ string? cursor = default,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetVoicesArguments(
+ httpClient: HttpClient,
+ limit: ref limit,
+ cursor: ref cursor);
+
+
+ var __authorizations = global::Soniox.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetVoicesSecurityRequirements,
+ operationName: "GetVoicesAsync");
+
+ using var __timeoutCancellationTokenSource = global::Soniox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Soniox.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Soniox.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Soniox.PathBuilder(
+ path: "/v1/voices",
+ baseUri: HttpClient.BaseAddress);
+ __pathBuilder
+ .AddOptionalParameter("limit", limit?.ToString())
+ .AddOptionalParameter("cursor", cursor)
+ ;
+ var __path = __pathBuilder.ToString();
+ __path = global::Soniox.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Soniox.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetVoicesRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ limit: limit,
+ cursor: cursor);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetVoices",
+ methodName: "GetVoicesAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Soniox.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetVoices",
+ methodName: "GetVoicesAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Soniox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Soniox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Soniox.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetVoices",
+ methodName: "GetVoicesAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Soniox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetVoicesResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetVoices",
+ methodName: "GetVoicesAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetVoices",
+ methodName: "GetVoicesAsync",
+ pathTemplate: "\"/v1/voices\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Bad Request
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::Soniox.ApiError? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::Soniox.ApiError.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::Soniox.ApiError.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::Soniox.ApiError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::Soniox.ApiError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::Soniox.ApiError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Too Many Requests
+ if ((int)__response.StatusCode == 429)
+ {
+ string? __content_429 = null;
+ global::System.Exception? __exception_429 = null;
+ global::Soniox.ApiError? __value_429 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_429 = global::Soniox.ApiError.FromJson(__content_429, JsonSerializerContext);
+ }
+ else
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_429 = global::Soniox.ApiError.FromJson(__content_429, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_429 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_429 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_429,
+ responseBody: __content_429,
+ responseObject: __value_429,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Internal Server Error
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::Soniox.ApiError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::Soniox.ApiError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::Soniox.ApiError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetVoicesResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Soniox.GetVoicesResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Soniox.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Soniox.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Soniox.GetVoicesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Soniox.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Soniox.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.VoicesClient.GetVoicesCount.g.cs b/src/libs/Soniox/Generated/Soniox.VoicesClient.GetVoicesCount.g.cs
new file mode 100644
index 0000000..07d63bb
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.VoicesClient.GetVoicesCount.g.cs
@@ -0,0 +1,528 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ public partial class VoicesClient
+ {
+
+
+ private static readonly global::Soniox.EndPointSecurityRequirement s_GetVoicesCountSecurityRequirement0 =
+ new global::Soniox.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Soniox.EndPointAuthorizationRequirement[]
+ { new global::Soniox.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Soniox.EndPointSecurityRequirement[] s_GetVoicesCountSecurityRequirements =
+ new global::Soniox.EndPointSecurityRequirement[]
+ { s_GetVoicesCountSecurityRequirement0,
+ };
+ partial void PrepareGetVoicesCountArguments(
+ global::System.Net.Http.HttpClient httpClient);
+ partial void PrepareGetVoicesCountRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage);
+ partial void ProcessGetVoicesCountResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetVoicesCountResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get voices count
+ /// Returns the total number of voices in your project.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task GetVoicesCountAsync(
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetVoicesCountAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get voices count
+ /// Returns the total number of voices in your project.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetVoicesCountAsResponseAsync(
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetVoicesCountArguments(
+ httpClient: HttpClient);
+
+
+ var __authorizations = global::Soniox.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetVoicesCountSecurityRequirements,
+ operationName: "GetVoicesCountAsync");
+
+ using var __timeoutCancellationTokenSource = global::Soniox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Soniox.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Soniox.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Soniox.PathBuilder(
+ path: "/v1/voices/count",
+ baseUri: HttpClient.BaseAddress);
+ var __path = __pathBuilder.ToString();
+ __path = global::Soniox.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Soniox.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetVoicesCountRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetVoicesCount",
+ methodName: "GetVoicesCountAsync",
+ pathTemplate: "\"/v1/voices/count\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Soniox.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetVoicesCount",
+ methodName: "GetVoicesCountAsync",
+ pathTemplate: "\"/v1/voices/count\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Soniox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Soniox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Soniox.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetVoicesCount",
+ methodName: "GetVoicesCountAsync",
+ pathTemplate: "\"/v1/voices/count\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Soniox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetVoicesCountResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetVoicesCount",
+ methodName: "GetVoicesCountAsync",
+ pathTemplate: "\"/v1/voices/count\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetVoicesCount",
+ methodName: "GetVoicesCountAsync",
+ pathTemplate: "\"/v1/voices/count\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::Soniox.ApiError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::Soniox.ApiError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::Soniox.ApiError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Too Many Requests
+ if ((int)__response.StatusCode == 429)
+ {
+ string? __content_429 = null;
+ global::System.Exception? __exception_429 = null;
+ global::Soniox.ApiError? __value_429 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_429 = global::Soniox.ApiError.FromJson(__content_429, JsonSerializerContext);
+ }
+ else
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_429 = global::Soniox.ApiError.FromJson(__content_429, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_429 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_429 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_429,
+ responseBody: __content_429,
+ responseObject: __value_429,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Internal Server Error
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::Soniox.ApiError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::Soniox.ApiError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::Soniox.ApiError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetVoicesCountResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Soniox.GetVoicesCountResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Soniox.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Soniox.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Soniox.GetVoicesCountResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Soniox.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Soniox.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.VoicesClient.RecomputeVoice.g.cs b/src/libs/Soniox/Generated/Soniox.VoicesClient.RecomputeVoice.g.cs
new file mode 100644
index 0000000..40c8470
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.VoicesClient.RecomputeVoice.g.cs
@@ -0,0 +1,659 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ public partial class VoicesClient
+ {
+
+
+ private static readonly global::Soniox.EndPointSecurityRequirement s_RecomputeVoiceSecurityRequirement0 =
+ new global::Soniox.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Soniox.EndPointAuthorizationRequirement[]
+ { new global::Soniox.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Soniox.EndPointSecurityRequirement[] s_RecomputeVoiceSecurityRequirements =
+ new global::Soniox.EndPointSecurityRequirement[]
+ { s_RecomputeVoiceSecurityRequirement0,
+ };
+ partial void PrepareRecomputeVoiceArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref global::System.Guid voiceId,
+ global::Soniox.RecomputeVoicePayload request);
+ partial void PrepareRecomputeVoiceRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::System.Guid voiceId,
+ global::Soniox.RecomputeVoicePayload request);
+ partial void ProcessRecomputeVoiceResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessRecomputeVoiceResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Recompute voice
+ /// Prepares the voice for use with available models it is not ready for yet. Use this after a new model is released to make an existing voice usable with it. Models the voice is already prepared for are left unchanged.
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task RecomputeVoiceAsync(
+ global::System.Guid voiceId,
+
+ global::Soniox.RecomputeVoicePayload request,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await RecomputeVoiceAsResponseAsync(
+ voiceId: voiceId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Recompute voice
+ /// Prepares the voice for use with available models it is not ready for yet. Use this after a new model is released to make an existing voice usable with it. Models the voice is already prepared for are left unchanged.
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> RecomputeVoiceAsResponseAsync(
+ global::System.Guid voiceId,
+
+ global::Soniox.RecomputeVoicePayload request,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareRecomputeVoiceArguments(
+ httpClient: HttpClient,
+ voiceId: ref voiceId,
+ request: request);
+
+
+ var __authorizations = global::Soniox.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_RecomputeVoiceSecurityRequirements,
+ operationName: "RecomputeVoiceAsync");
+
+ using var __timeoutCancellationTokenSource = global::Soniox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Soniox.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Soniox.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Soniox.PathBuilder(
+ path: $"/v1/voices/{voiceId}/recompute",
+ baseUri: HttpClient.BaseAddress);
+ var __path = __pathBuilder.ToString();
+ __path = global::Soniox.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::Soniox.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareRecomputeVoiceRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ voiceId: voiceId!,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "RecomputeVoice",
+ methodName: "RecomputeVoiceAsync",
+ pathTemplate: "$\"/v1/voices/{voiceId}/recompute\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Soniox.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "RecomputeVoice",
+ methodName: "RecomputeVoiceAsync",
+ pathTemplate: "$\"/v1/voices/{voiceId}/recompute\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Soniox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Soniox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Soniox.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "RecomputeVoice",
+ methodName: "RecomputeVoiceAsync",
+ pathTemplate: "$\"/v1/voices/{voiceId}/recompute\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Soniox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessRecomputeVoiceResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "RecomputeVoice",
+ methodName: "RecomputeVoiceAsync",
+ pathTemplate: "$\"/v1/voices/{voiceId}/recompute\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "RecomputeVoice",
+ methodName: "RecomputeVoiceAsync",
+ pathTemplate: "$\"/v1/voices/{voiceId}/recompute\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Bad Request
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::Soniox.ApiError? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::Soniox.ApiError.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::Soniox.ApiError.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::Soniox.ApiError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::Soniox.ApiError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::Soniox.ApiError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Not Found
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::Soniox.ApiError? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::Soniox.ApiError.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::Soniox.ApiError.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ responseBody: __content_404,
+ responseObject: __value_404,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Too Many Requests
+ if ((int)__response.StatusCode == 429)
+ {
+ string? __content_429 = null;
+ global::System.Exception? __exception_429 = null;
+ global::Soniox.ApiError? __value_429 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_429 = global::Soniox.ApiError.FromJson(__content_429, JsonSerializerContext);
+ }
+ else
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_429 = global::Soniox.ApiError.FromJson(__content_429, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_429 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_429 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_429,
+ responseBody: __content_429,
+ responseObject: __value_429,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Internal Server Error
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::Soniox.ApiError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::Soniox.ApiError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::Soniox.ApiError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessRecomputeVoiceResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Soniox.Voice.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Soniox.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Soniox.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Soniox.Voice.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Soniox.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Soniox.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Soniox.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Recompute voice
+ /// Prepares the voice for use with available models it is not ready for yet. Use this after a new model is released to make an existing voice usable with it. Models the voice is already prepared for are left unchanged.
+ ///
+ ///
+ ///
+ /// The model to prepare this voice for. If omitted, the voice is prepared for every available model it is not ready for yet.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task RecomputeVoiceAsync(
+ global::System.Guid voiceId,
+ string? model = default,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Soniox.RecomputeVoicePayload
+ {
+ Model = model,
+ };
+
+ return await RecomputeVoiceAsync(
+ voiceId: voiceId,
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.VoicesClient.g.cs b/src/libs/Soniox/Generated/Soniox.VoicesClient.g.cs
new file mode 100644
index 0000000..15ab53f
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.VoicesClient.g.cs
@@ -0,0 +1,136 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ public sealed partial class VoicesClient : global::Soniox.IVoicesClient, global::System.IDisposable
+ {
+ ///
+ /// Soniox API
+ ///
+ public const string DefaultBaseUrl = "https://api.soniox.com/";
+
+ private bool _disposeHttpClient = true;
+
+ ///
+ public global::System.Net.Http.HttpClient HttpClient { get; }
+
+ ///
+ public System.Uri? BaseUri => HttpClient.BaseAddress;
+
+ ///
+ public global::System.Collections.Generic.List Authorizations { get; }
+
+ ///
+ public bool ReadResponseAsString { get; set; }
+#if DEBUG
+ = true;
+#endif
+
+ ///
+ public global::Soniox.AutoSDKClientOptions Options { get; }
+ ///
+ ///
+ ///
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Soniox.SourceGenerationContext.Default;
+
+
+ ///
+ /// Creates a new instance of the VoicesClient.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.
+ /// The authorizations to use for the requests.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public VoicesClient(
+ global::System.Net.Http.HttpClient? httpClient = null,
+ global::System.Uri? baseUri = null,
+ global::System.Collections.Generic.List? authorizations = null,
+ bool disposeHttpClient = true) : this(
+ httpClient,
+ baseUri,
+ authorizations,
+ options: null,
+ disposeHttpClient: disposeHttpClient)
+ {
+ }
+
+ ///
+ /// Creates a new instance of the VoicesClient with explicit options but no base URL override.
+ /// Skips passing baseUri so the default base URL from the OpenAPI spec applies.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The authorizations to use for the requests.
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public VoicesClient(
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Collections.Generic.List? authorizations,
+ global::Soniox.AutoSDKClientOptions? options,
+ bool disposeHttpClient = true) : this(
+ httpClient,
+ baseUri: null,
+ authorizations,
+ options,
+ disposeHttpClient: disposeHttpClient)
+ {
+ }
+
+ ///
+ /// Creates a new instance of the VoicesClient.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.
+ /// The authorizations to use for the requests.
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public VoicesClient(
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Soniox.AutoSDKClientOptions? options,
+ bool disposeHttpClient = true)
+ {
+
+ HttpClient = httpClient ?? new global::System.Net.Http.HttpClient();
+ HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl);
+ Authorizations = authorizations ?? new global::System.Collections.Generic.List();
+ Options = options ?? new global::Soniox.AutoSDKClientOptions();
+ _disposeHttpClient = disposeHttpClient;
+
+ Initialized(HttpClient);
+ }
+
+ ///