diff --git a/src/libs/Soniox/Generated/Soniox.AnyOf.2.g.cs b/src/libs/Soniox/Generated/Soniox.AnyOf.2.g.cs
deleted file mode 100644
index bfeda69..0000000
--- a/src/libs/Soniox/Generated/Soniox.AnyOf.2.g.cs
+++ /dev/null
@@ -1,294 +0,0 @@
-
-#nullable enable
-
-namespace Soniox
-{
- ///
- ///
- ///
- public readonly partial struct AnyOf : global::System.IEquatable>
- {
- ///
- ///
- ///
-#if NET6_0_OR_GREATER
- public T1? Value1 { get; init; }
-#else
- public T1? Value1 { get; }
-#endif
-
- ///
- ///
- ///
-#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))]
-#endif
- public bool IsValue1 => Value1 != null;
-
- ///
- ///
- ///
- public bool TryPickValue1(
-#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
-#endif
- out T1? value)
- {
- value = Value1;
- return IsValue1;
- }
-
- ///
- ///
- ///
- public T1 PickValue1() => IsValue1
- ? Value1!
- : throw new global::System.InvalidOperationException($"Expected union variant 'Value1' but the value was {ToString()}.");
-
- ///
- ///
- ///
-#if NET6_0_OR_GREATER
- public T2? Value2 { get; init; }
-#else
- public T2? Value2 { get; }
-#endif
-
- ///
- ///
- ///
-#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))]
-#endif
- public bool IsValue2 => Value2 != null;
-
- ///
- ///
- ///
- public bool TryPickValue2(
-#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
-#endif
- out T2? value)
- {
- value = Value2;
- return IsValue2;
- }
-
- ///
- ///
- ///
- public T2 PickValue2() => IsValue2
- ? Value2!
- : throw new global::System.InvalidOperationException($"Expected union variant 'Value2' but the value was {ToString()}.");
- ///
- ///
- ///
- public static implicit operator AnyOf(T1 value) => new AnyOf((T1?)value);
-
- ///
- ///
- ///
- public static implicit operator T1?(AnyOf @this) => @this.Value1;
-
- ///
- ///
- ///
- public AnyOf(T1? value)
- {
- Value1 = value;
- }
-
- ///
- ///
- ///
- public static AnyOf FromValue1(T1? value) => new AnyOf(value);
-
- ///
- ///
- ///
- public static implicit operator AnyOf(T2 value) => new AnyOf((T2?)value);
-
- ///
- ///
- ///
- public static implicit operator T2?(AnyOf @this) => @this.Value2;
-
- ///
- ///
- ///
- public AnyOf(T2? value)
- {
- Value2 = value;
- }
-
- ///
- ///
- ///
- public static AnyOf FromValue2(T2? value) => new AnyOf(value);
-
- ///
- ///
- ///
- public AnyOf(
- T1? value1,
- T2? value2
- )
- {
- Value1 = value1;
- Value2 = value2;
- }
-
- ///
- ///
- ///
- public object? Object =>
- Value2 as object ??
- Value1 as object
- ;
-
- ///
- ///
- ///
- public override string? ToString() =>
- Value1?.ToString() ??
- Value2?.ToString()
- ;
-
- ///
- ///
- ///
- public bool Validate()
- {
- return IsValue1 || IsValue2;
- }
-
- ///
- ///
- ///
- public TResult? Match(
- global::System.Func? value1 = null,
- global::System.Func? value2 = null,
- bool validate = true)
- {
- if (validate)
- {
- Validate();
- }
-
- if (IsValue1 && value1 != null)
- {
- return value1(Value1!);
- }
- else if (IsValue2 && value2 != null)
- {
- return value2(Value2!);
- }
-
- return default(TResult);
- }
-
- ///
- ///
- ///
- public void Match(
- global::System.Action? value1 = null,
-
- global::System.Action? value2 = null,
- bool validate = true)
- {
- if (validate)
- {
- Validate();
- }
-
- if (IsValue1)
- {
- value1?.Invoke(Value1!);
- }
- else if (IsValue2)
- {
- value2?.Invoke(Value2!);
- }
- }
-
- ///
- ///
- ///
- public void Switch(
- global::System.Action? value1 = null,
- global::System.Action? value2 = null,
- bool validate = true)
- {
- if (validate)
- {
- Validate();
- }
-
- if (IsValue1)
- {
- value1?.Invoke(Value1!);
- }
- else if (IsValue2)
- {
- value2?.Invoke(Value2!);
- }
- }
-
- ///
- ///
- ///
- public override int GetHashCode()
- {
- var fields = new object?[]
- {
- Value1,
- typeof(T1),
- Value2,
- typeof(T2),
- };
- const int offset = unchecked((int)2166136261);
- const int prime = 16777619;
- static int HashCodeAggregator(int hashCode, object? value) => value == null
- ? (hashCode ^ 0) * prime
- : (hashCode ^ value.GetHashCode()) * prime;
-
- return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator);
- }
-
- ///
- ///
- ///
- public bool Equals(AnyOf other)
- {
- return
- global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) &&
- global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2)
- ;
- }
-
- ///
- ///
- ///
- public static bool operator ==(AnyOf obj1, AnyOf obj2)
- {
- return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2);
- }
-
- ///
- ///
- ///
- public static bool operator !=(AnyOf obj1, AnyOf obj2)
- {
- return !(obj1 == obj2);
- }
-
- ///
- ///
- ///
- public override bool Equals(object? obj)
- {
- return obj is AnyOf o && Equals(o);
- }
- }
-}
diff --git a/src/libs/Soniox/Generated/Soniox.ConcurrentStreamsHistoryClient.GetConcurrentStreamsHistory.g.cs b/src/libs/Soniox/Generated/Soniox.ConcurrentStreamsHistoryClient.GetConcurrentStreamsHistory.g.cs
new file mode 100644
index 0000000..24264d5
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.ConcurrentStreamsHistoryClient.GetConcurrentStreamsHistory.g.cs
@@ -0,0 +1,625 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ public partial class ConcurrentStreamsHistoryClient
+ {
+
+
+ private static readonly global::Soniox.EndPointSecurityRequirement s_GetConcurrentStreamsHistorySecurityRequirement0 =
+ 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_GetConcurrentStreamsHistorySecurityRequirements =
+ new global::Soniox.EndPointSecurityRequirement[]
+ { s_GetConcurrentStreamsHistorySecurityRequirement0,
+ };
+ partial void PrepareGetConcurrentStreamsHistoryArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string startTime,
+ ref string endTime,
+ ref int periodSec,
+ ref global::Soniox.GetConcurrentStreamsHistoryKind2 kind);
+ partial void PrepareGetConcurrentStreamsHistoryRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string startTime,
+ string endTime,
+ int periodSec,
+ global::Soniox.GetConcurrentStreamsHistoryKind2 kind);
+ partial void ProcessGetConcurrentStreamsHistoryResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetConcurrentStreamsHistoryResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get concurrent streams history
+ /// Returns historical concurrent stream counts for the project, aggregated per period. The project is implied by the API key used for authentication. Region-scoped.
+ /// Every aggregation period in the requested window is returned, with no gaps. Periods with no recorded activity have every field set to `0`.
+ ///
+ ///
+ /// Start of the time window (inclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-28T09:00:00Z`). Filters by `period_start`.
+ ///
+ ///
+ /// End of the time window (exclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-28T09:00:00Z`) and strictly after `start_time`. Filters by `period_start`.
+ ///
+ ///
+ /// Aggregation period in seconds. One of `60` (per-minute), `3600` (hourly), `86400` (daily). The period also caps how long the requested window may be.
+ ///
+ ///
+ /// Stream kind to return. `stt` covers Speech-to-Text WebSocket sessions, `tts` covers Text-to-Speech WebSocket streams and REST requests.
+ ///
+ /// 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 GetConcurrentStreamsHistoryAsync(
+ string startTime,
+ string endTime,
+ int periodSec,
+ global::Soniox.GetConcurrentStreamsHistoryKind2 kind,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetConcurrentStreamsHistoryAsResponseAsync(
+ startTime: startTime,
+ endTime: endTime,
+ periodSec: periodSec,
+ kind: kind,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get concurrent streams history
+ /// Returns historical concurrent stream counts for the project, aggregated per period. The project is implied by the API key used for authentication. Region-scoped.
+ /// Every aggregation period in the requested window is returned, with no gaps. Periods with no recorded activity have every field set to `0`.
+ ///
+ ///
+ /// Start of the time window (inclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-28T09:00:00Z`). Filters by `period_start`.
+ ///
+ ///
+ /// End of the time window (exclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-28T09:00:00Z`) and strictly after `start_time`. Filters by `period_start`.
+ ///
+ ///
+ /// Aggregation period in seconds. One of `60` (per-minute), `3600` (hourly), `86400` (daily). The period also caps how long the requested window may be.
+ ///
+ ///
+ /// Stream kind to return. `stt` covers Speech-to-Text WebSocket sessions, `tts` covers Text-to-Speech WebSocket streams and REST requests.
+ ///
+ /// 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> GetConcurrentStreamsHistoryAsResponseAsync(
+ string startTime,
+ string endTime,
+ int periodSec,
+ global::Soniox.GetConcurrentStreamsHistoryKind2 kind,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetConcurrentStreamsHistoryArguments(
+ httpClient: HttpClient,
+ startTime: ref startTime,
+ endTime: ref endTime,
+ periodSec: ref periodSec,
+ kind: ref kind);
+
+
+ var __authorizations = global::Soniox.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetConcurrentStreamsHistorySecurityRequirements,
+ operationName: "GetConcurrentStreamsHistoryAsync");
+
+ 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/concurrent-streams-history",
+ baseUri: HttpClient.BaseAddress);
+ __pathBuilder
+ .AddRequiredParameter("start_time", startTime)
+ .AddRequiredParameter("end_time", endTime)
+ .AddRequiredParameter("period_sec", periodSec.ToString()!)
+ .AddRequiredParameter("kind", kind.ToString()!)
+ ;
+ 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);
+ PrepareGetConcurrentStreamsHistoryRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ startTime: startTime!,
+ endTime: endTime!,
+ periodSec: periodSec!,
+ kind: kind!);
+
+ 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: "GetConcurrentStreamsHistory",
+ methodName: "GetConcurrentStreamsHistoryAsync",
+ pathTemplate: "\"/v1/concurrent-streams-history\"",
+ 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: "GetConcurrentStreamsHistory",
+ methodName: "GetConcurrentStreamsHistoryAsync",
+ pathTemplate: "\"/v1/concurrent-streams-history\"",
+ 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: "GetConcurrentStreamsHistory",
+ methodName: "GetConcurrentStreamsHistoryAsync",
+ pathTemplate: "\"/v1/concurrent-streams-history\"",
+ 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);
+ ProcessGetConcurrentStreamsHistoryResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetConcurrentStreamsHistory",
+ methodName: "GetConcurrentStreamsHistoryAsync",
+ pathTemplate: "\"/v1/concurrent-streams-history\"",
+ 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: "GetConcurrentStreamsHistory",
+ methodName: "GetConcurrentStreamsHistoryAsync",
+ pathTemplate: "\"/v1/concurrent-streams-history\"",
+ 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);
+ }
+ // Invalid request. Error types: - `invalid_request`: A query parameter is missing or invalid. Common causes: `period_sec` is not one of `60`, `3600`, `86400`, `start_time` / `end_time` not parseable as ISO 8601, `end_time` not strictly after `start_time`, the window between them exceeds the maximum for the requested `period_sec`, or the window would return more than 20000 entries.
+ 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));
+ }
+ // Authentication error.
+ 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));
+ }
+ // Rate / capacity limit exceeded. Error types: - `limit_exceeded`: The caller hit a per-minute request rate or other capacity limit. The `message` describes which limit was hit.
+ 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);
+ ProcessGetConcurrentStreamsHistoryResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Soniox.GetConcurrentStreamsHistoryResponse.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.GetConcurrentStreamsHistoryResponse.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.ConcurrentStreamsHistoryClient.g.cs b/src/libs/Soniox/Generated/Soniox.ConcurrentStreamsHistoryClient.g.cs
new file mode 100644
index 0000000..bdb3461
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.ConcurrentStreamsHistoryClient.g.cs
@@ -0,0 +1,144 @@
+
+#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 ConcurrentStreamsHistoryClient : global::Soniox.IConcurrentStreamsHistoryClient, 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; }
+
+
+ internal global::Soniox.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::Soniox.AutoSDKServerConfiguration();
+ ///
+ ///
+ ///
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Soniox.SourceGenerationContext.Default;
+
+
+ ///
+ /// Creates a new instance of the ConcurrentStreamsHistoryClient.
+ /// 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 ConcurrentStreamsHistoryClient(
+ 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 ConcurrentStreamsHistoryClient 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 ConcurrentStreamsHistoryClient(
+ 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 ConcurrentStreamsHistoryClient.
+ /// 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 ConcurrentStreamsHistoryClient(
+ 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();
+ if (baseUri is not null)
+ {
+ HttpClient.BaseAddress ??= baseUri;
+ }
+ Authorizations = authorizations ?? new global::System.Collections.Generic.List();
+ Options = options ?? new global::Soniox.AutoSDKClientOptions();
+ _disposeHttpClient = disposeHttpClient;
+
+ AutoSDKServerConfiguration.ExplicitBaseUri = baseUri ?? httpClient?.BaseAddress;
+
+ Initialized(HttpClient);
+ }
+
+ ///
+ public void Dispose()
+ {
+ if (_disposeHttpClient)
+ {
+ HttpClient.Dispose();
+ }
+ }
+
+ partial void Initialized(
+ global::System.Net.Http.HttpClient client);
+ partial void PrepareArguments(
+ global::System.Net.Http.HttpClient client);
+ partial void PrepareRequest(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpRequestMessage request);
+ partial void ProcessResponse(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpResponseMessage response);
+ partial void ProcessResponseContent(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpResponseMessage response,
+ ref string content);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.IConcurrentStreamsHistoryClient.GetConcurrentStreamsHistory.g.cs b/src/libs/Soniox/Generated/Soniox.IConcurrentStreamsHistoryClient.GetConcurrentStreamsHistory.g.cs
new file mode 100644
index 0000000..ed94491
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.IConcurrentStreamsHistoryClient.GetConcurrentStreamsHistory.g.cs
@@ -0,0 +1,62 @@
+#nullable enable
+
+namespace Soniox
+{
+ public partial interface IConcurrentStreamsHistoryClient
+ {
+ ///
+ /// Get concurrent streams history
+ /// Returns historical concurrent stream counts for the project, aggregated per period. The project is implied by the API key used for authentication. Region-scoped.
+ /// Every aggregation period in the requested window is returned, with no gaps. Periods with no recorded activity have every field set to `0`.
+ ///
+ ///
+ /// Start of the time window (inclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-28T09:00:00Z`). Filters by `period_start`.
+ ///
+ ///
+ /// End of the time window (exclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-28T09:00:00Z`) and strictly after `start_time`. Filters by `period_start`.
+ ///
+ ///
+ /// Aggregation period in seconds. One of `60` (per-minute), `3600` (hourly), `86400` (daily). The period also caps how long the requested window may be.
+ ///
+ ///
+ /// Stream kind to return. `stt` covers Speech-to-Text WebSocket sessions, `tts` covers Text-to-Speech WebSocket streams and REST requests.
+ ///
+ /// 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 GetConcurrentStreamsHistoryAsync(
+ string startTime,
+ string endTime,
+ int periodSec,
+ global::Soniox.GetConcurrentStreamsHistoryKind2 kind,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get concurrent streams history
+ /// Returns historical concurrent stream counts for the project, aggregated per period. The project is implied by the API key used for authentication. Region-scoped.
+ /// Every aggregation period in the requested window is returned, with no gaps. Periods with no recorded activity have every field set to `0`.
+ ///
+ ///
+ /// Start of the time window (inclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-28T09:00:00Z`). Filters by `period_start`.
+ ///
+ ///
+ /// End of the time window (exclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-28T09:00:00Z`) and strictly after `start_time`. Filters by `period_start`.
+ ///
+ ///
+ /// Aggregation period in seconds. One of `60` (per-minute), `3600` (hourly), `86400` (daily). The period also caps how long the requested window may be.
+ ///
+ ///
+ /// Stream kind to return. `stt` covers Speech-to-Text WebSocket sessions, `tts` covers Text-to-Speech WebSocket streams and REST requests.
+ ///
+ /// 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> GetConcurrentStreamsHistoryAsResponseAsync(
+ string startTime,
+ string endTime,
+ int periodSec,
+ global::Soniox.GetConcurrentStreamsHistoryKind2 kind,
+ 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.IConcurrentStreamsHistoryClient.g.cs b/src/libs/Soniox/Generated/Soniox.IConcurrentStreamsHistoryClient.g.cs
new file mode 100644
index 0000000..b1e77af
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.IConcurrentStreamsHistoryClient.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 IConcurrentStreamsHistoryClient : 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.ISonioxClient.g.cs b/src/libs/Soniox/Generated/Soniox.ISonioxClient.g.cs
index dc70329..d578e72 100644
--- a/src/libs/Soniox/Generated/Soniox.ISonioxClient.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.ISonioxClient.g.cs
@@ -75,6 +75,11 @@ public partial interface ISonioxClient : global::System.IDisposable
///
public ConcurrencyLimitsClient ConcurrencyLimits { get; }
+ ///
+ ///
+ ///
+ public ConcurrentStreamsHistoryClient ConcurrentStreamsHistory { get; }
+
///
///
///
@@ -105,6 +110,11 @@ public partial interface ISonioxClient : global::System.IDisposable
///
public UsageLogsClient UsageLogs { get; }
+ ///
+ ///
+ ///
+ public UsageSummaryClient UsageSummary { get; }
+
///
///
///
diff --git a/src/libs/Soniox/Generated/Soniox.ITtsClient.GenerateTts.g.cs b/src/libs/Soniox/Generated/Soniox.ITtsClient.GenerateTts.g.cs
index d729635..8a287d5 100644
--- a/src/libs/Soniox/Generated/Soniox.ITtsClient.GenerateTts.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.ITtsClient.GenerateTts.g.cs
@@ -82,6 +82,9 @@ public partial interface ITtsClient
///
/// Optional speaking rate of the generated speech, from `0.7` to `1.3`. `1.0` is the normal speed; lower values slow speech down and higher values speed it up. Defaults to `1.0`.
///
+ ///
+ /// Optional. When `true`, shortens the pauses between words so the generated speech flows more naturally. Defaults to `false`. Only supported on models with `supports_silence_reduction` set to `true`; enabling it on any other model returns an `invalid_request` error.
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -96,6 +99,7 @@ public partial interface ITtsClient
int? bitrate = default,
string? clientReferenceId = default,
double? speed = default,
+ bool? reduceSilence = default,
global::Soniox.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/Soniox/Generated/Soniox.IUsageSummaryClient.GetUsageSummary.g.cs b/src/libs/Soniox/Generated/Soniox.IUsageSummaryClient.GetUsageSummary.g.cs
new file mode 100644
index 0000000..fb796c8
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.IUsageSummaryClient.GetUsageSummary.g.cs
@@ -0,0 +1,46 @@
+#nullable enable
+
+namespace Soniox
+{
+ public partial interface IUsageSummaryClient
+ {
+ ///
+ /// Get usage summary
+ /// Returns daily cost and activity for the project, broken down per model and summed across all models. The project is implied by the API key used for authentication.
+ /// Usage is aggregated by whole UTC day. The window is half-open, `[start_time, end_time)`, and a day is included when the window covers any part of it, so an `end_time` exactly at midnight excludes that day. The window must not cover more than 366 UTC days.
+ ///
+ ///
+ /// Start of the window (inclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-01T00:00:00Z`). Its UTC day is included.
+ ///
+ ///
+ /// End of the window (exclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-03T00:00:00Z`) and strictly after `start_time`. Its UTC day is included unless it falls exactly on midnight.
+ ///
+ /// 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 GetUsageSummaryAsync(
+ string startTime,
+ string endTime,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get usage summary
+ /// Returns daily cost and activity for the project, broken down per model and summed across all models. The project is implied by the API key used for authentication.
+ /// Usage is aggregated by whole UTC day. The window is half-open, `[start_time, end_time)`, and a day is included when the window covers any part of it, so an `end_time` exactly at midnight excludes that day. The window must not cover more than 366 UTC days.
+ ///
+ ///
+ /// Start of the window (inclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-01T00:00:00Z`). Its UTC day is included.
+ ///
+ ///
+ /// End of the window (exclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-03T00:00:00Z`) and strictly after `start_time`. Its UTC day is included unless it falls exactly on midnight.
+ ///
+ /// 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> GetUsageSummaryAsResponseAsync(
+ string startTime,
+ string endTime,
+ 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.IUsageSummaryClient.g.cs b/src/libs/Soniox/Generated/Soniox.IUsageSummaryClient.g.cs
new file mode 100644
index 0000000..79ae672
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.IUsageSummaryClient.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 IUsageSummaryClient : 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.AnyOf2.g.cs b/src/libs/Soniox/Generated/Soniox.JsonConverters.AnyOf2.g.cs
deleted file mode 100644
index b507775..0000000
--- a/src/libs/Soniox/Generated/Soniox.JsonConverters.AnyOf2.g.cs
+++ /dev/null
@@ -1,161 +0,0 @@
-#nullable enable
-
-namespace Soniox.JsonConverters
-{
- ///
- public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter>
- {
- ///
- public override global::Soniox.AnyOf Read(
- ref global::System.Text.Json.Utf8JsonReader reader,
- global::System.Type typeToConvert,
- global::System.Text.Json.JsonSerializerOptions options)
- {
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
-
-
- using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
- var __rawJson = __jsonDocument.RootElement.GetRawText();
- var __jsonProps = new global::System.Collections.Generic.HashSet();
- if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object)
- {
- foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject())
- {
- __jsonProps.Add(__jsonProp.Name);
- }
- }
-
- var __score0 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(T1), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score0++;
- }
- }
- }
- var __score1 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(T2), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score1++;
- }
- }
- }
- var __bestScore = 0;
- var __bestIndex = -1;
- if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
- if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
-
- T1? value1 = default;
- T2? value2 = default;
- if (__bestIndex >= 0)
- {
- if (__bestIndex == 0)
- {
- try
- {
-
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
- }
- catch (global::System.Text.Json.JsonException)
- {
- }
- catch (global::System.InvalidOperationException)
- {
- }
- }
-
- else if (__bestIndex == 1)
- {
- try
- {
-
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
- }
- catch (global::System.Text.Json.JsonException)
- {
- }
- catch (global::System.InvalidOperationException)
- {
- }
- }
- }
-
- if (value1 == null && value2 == null)
- {
- try
- {
-
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
- }
- catch (global::System.Text.Json.JsonException)
- {
- }
- catch (global::System.InvalidOperationException)
- {
- }
- }
-
- if (value1 == null && value2 == null)
- {
- try
- {
-
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
- }
- catch (global::System.Text.Json.JsonException)
- {
- }
- catch (global::System.InvalidOperationException)
- {
- }
- }
-
- var __value = new global::Soniox.AnyOf(
- value1,
-
- value2
- );
-
- return __value;
- }
-
- ///
- public override void Write(
- global::System.Text.Json.Utf8JsonWriter writer,
- global::Soniox.AnyOf value,
- global::System.Text.Json.JsonSerializerOptions options)
- {
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
-
- if (value.IsValue1)
- {
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo);
- }
- else if (value.IsValue2)
- {
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.JsonConverters.ConcurrentStreamKind.g.cs b/src/libs/Soniox/Generated/Soniox.JsonConverters.ConcurrentStreamKind.g.cs
new file mode 100644
index 0000000..dc28e6d
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.JsonConverters.ConcurrentStreamKind.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Soniox.JsonConverters
+{
+ ///
+ public sealed class ConcurrentStreamKindJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Soniox.ConcurrentStreamKind 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.ConcurrentStreamKindExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Soniox.ConcurrentStreamKind)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Soniox.ConcurrentStreamKind);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Soniox.ConcurrentStreamKind value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Soniox.ConcurrentStreamKindExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.JsonConverters.ConcurrentStreamKindNullable.g.cs b/src/libs/Soniox/Generated/Soniox.JsonConverters.ConcurrentStreamKindNullable.g.cs
new file mode 100644
index 0000000..19c177f
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.JsonConverters.ConcurrentStreamKindNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Soniox.JsonConverters
+{
+ ///
+ public sealed class ConcurrentStreamKindNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Soniox.ConcurrentStreamKind? 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.ConcurrentStreamKindExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Soniox.ConcurrentStreamKind)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Soniox.ConcurrentStreamKind?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Soniox.ConcurrentStreamKind? 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.ConcurrentStreamKindExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.JsonConverters.GetConcurrentStreamsHistoryKind2.g.cs b/src/libs/Soniox/Generated/Soniox.JsonConverters.GetConcurrentStreamsHistoryKind2.g.cs
new file mode 100644
index 0000000..9e6da2b
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.JsonConverters.GetConcurrentStreamsHistoryKind2.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Soniox.JsonConverters
+{
+ ///
+ public sealed class GetConcurrentStreamsHistoryKind2JsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Soniox.GetConcurrentStreamsHistoryKind2 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.GetConcurrentStreamsHistoryKind2Extensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Soniox.GetConcurrentStreamsHistoryKind2)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Soniox.GetConcurrentStreamsHistoryKind2);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Soniox.GetConcurrentStreamsHistoryKind2 value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Soniox.GetConcurrentStreamsHistoryKind2Extensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.JsonConverters.GetConcurrentStreamsHistoryKind2Nullable.g.cs b/src/libs/Soniox/Generated/Soniox.JsonConverters.GetConcurrentStreamsHistoryKind2Nullable.g.cs
new file mode 100644
index 0000000..8a44b04
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.JsonConverters.GetConcurrentStreamsHistoryKind2Nullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Soniox.JsonConverters
+{
+ ///
+ public sealed class GetConcurrentStreamsHistoryKind2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Soniox.GetConcurrentStreamsHistoryKind2? 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.GetConcurrentStreamsHistoryKind2Extensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Soniox.GetConcurrentStreamsHistoryKind2)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Soniox.GetConcurrentStreamsHistoryKind2?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Soniox.GetConcurrentStreamsHistoryKind2? 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.GetConcurrentStreamsHistoryKind2Extensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.JsonSerializerContext.g.cs b/src/libs/Soniox/Generated/Soniox.JsonSerializerContext.g.cs
index 9154b8e..c0ee424 100644
--- a/src/libs/Soniox/Generated/Soniox.JsonSerializerContext.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.JsonSerializerContext.g.cs
@@ -45,25 +45,19 @@ namespace Soniox
typeof(global::Soniox.JsonConverters.GetUsageLogsPayloadSortNullableJsonConverter),
- typeof(global::Soniox.JsonConverters.GetUsageLogsSort2JsonConverter),
-
- typeof(global::Soniox.JsonConverters.GetUsageLogsSort2NullableJsonConverter),
-
- typeof(global::Soniox.JsonConverters.AnyOfJsonConverter),
+ typeof(global::Soniox.JsonConverters.ConcurrentStreamKindJsonConverter),
- typeof(global::Soniox.JsonConverters.AnyOfJsonConverter),
+ typeof(global::Soniox.JsonConverters.ConcurrentStreamKindNullableJsonConverter),
- typeof(global::Soniox.JsonConverters.AnyOfJsonConverter),
-
- typeof(global::Soniox.JsonConverters.AnyOfJsonConverter),
+ typeof(global::Soniox.JsonConverters.GetUsageLogsSort2JsonConverter),
- typeof(global::Soniox.JsonConverters.AnyOfJsonConverter),
+ typeof(global::Soniox.JsonConverters.GetUsageLogsSort2NullableJsonConverter),
- typeof(global::Soniox.JsonConverters.AnyOfJsonConverter),
+ typeof(global::Soniox.JsonConverters.GetConcurrentStreamsHistoryKind2JsonConverter),
- typeof(global::Soniox.JsonConverters.AnyOfJsonConverter),
+ typeof(global::Soniox.JsonConverters.GetConcurrentStreamsHistoryKind2NullableJsonConverter),
- typeof(global::Soniox.JsonConverters.AnyOfJsonConverter),
+ typeof(global::Soniox.JsonConverters.AnyOfJsonConverter),
typeof(global::Soniox.JsonConverters.UnixTimestampJsonConverter),
})]
@@ -137,15 +131,24 @@ namespace Soniox
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.GetUsageLogsResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.UsageLogEntry))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.AnyOf), TypeInfoPropertyName = "AnyOfDoubleString2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.GetUsageSummaryResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.UsageSummaryEntry))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.GetConcurrencyLimitsResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.ScopeValues))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.CurrentValues))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.LimitValues))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.GetConcurrentStreamsHistoryResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.ConcurrentStreamKind), TypeInfoPropertyName = "ConcurrentStreamKind2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.ConcurrentStreamsHistoryEntry))]
[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::Soniox.GetConcurrentStreamsHistoryKind2), TypeInfoPropertyName = "GetConcurrentStreamsHistoryKind22")]
[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))]
@@ -161,6 +164,10 @@ 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))]
public sealed partial class SourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext
{
}
diff --git a/src/libs/Soniox/Generated/Soniox.JsonSerializerContextTypes.g.cs b/src/libs/Soniox/Generated/Soniox.JsonSerializerContextTypes.g.cs
index 8909d99..8917e3f 100644
--- a/src/libs/Soniox/Generated/Soniox.JsonSerializerContextTypes.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.JsonSerializerContextTypes.g.cs
@@ -304,39 +304,75 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::Soniox.AnyOf? Type69 { get; set; }
+ public global::Soniox.GetUsageSummaryResponse? Type69 { get; set; }
///
///
///
- public global::Soniox.GetConcurrencyLimitsResponse? Type70 { get; set; }
+ public global::Soniox.UsageSummaryEntry? Type70 { get; set; }
///
///
///
- public global::Soniox.ScopeValues? Type71 { get; set; }
+ public global::System.Collections.Generic.IList? Type71 { get; set; }
///
///
///
- public global::Soniox.CurrentValues? Type72 { get; set; }
+ public global::System.Collections.Generic.IList? Type72 { get; set; }
///
///
///
- public global::Soniox.LimitValues? Type73 { get; set; }
+ public global::System.Collections.Generic.IList? Type73 { get; set; }
///
///
///
- public global::Soniox.UploadFileRequest? Type74 { get; set; }
+ public global::Soniox.GetConcurrencyLimitsResponse? Type74 { get; set; }
///
///
///
- public byte[]? Type75 { get; set; }
+ public global::Soniox.ScopeValues? Type75 { get; set; }
///
///
///
- public global::Soniox.CreateVoiceRequest? Type76 { get; set; }
+ public global::Soniox.CurrentValues? Type76 { get; set; }
///
///
///
- public global::Soniox.GetUsageLogsSort2? Type77 { get; set; }
+ public global::Soniox.LimitValues? Type77 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.GetConcurrentStreamsHistoryResponse? Type78 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.ConcurrentStreamKind? Type79 { get; set; }
+ ///
+ ///
+ ///
+ public global::System.Collections.Generic.IList? Type80 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.ConcurrentStreamsHistoryEntry? Type81 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.UploadFileRequest? Type82 { get; set; }
+ ///
+ ///
+ ///
+ public byte[]? Type83 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.CreateVoiceRequest? Type84 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.GetUsageLogsSort2? Type85 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.GetConcurrentStreamsHistoryKind2? Type86 { get; set; }
///
///
@@ -398,5 +434,21 @@ public sealed partial class JsonSerializerContextTypes
///
///
public global::System.Collections.Generic.List? ListType14 { get; set; }
+ ///
+ ///
+ ///
+ public global::System.Collections.Generic.List? ListType15 { get; set; }
+ ///
+ ///
+ ///
+ public global::System.Collections.Generic.List? ListType16 { get; set; }
+ ///
+ ///
+ ///
+ public global::System.Collections.Generic.List? ListType17 { get; set; }
+ ///
+ ///
+ ///
+ public global::System.Collections.Generic.List? ListType18 { get; set; }
}
}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.ConcurrentStreamKind.g.cs b/src/libs/Soniox/Generated/Soniox.Models.ConcurrentStreamKind.g.cs
new file mode 100644
index 0000000..ef96754
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.ConcurrentStreamKind.g.cs
@@ -0,0 +1,51 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ ///
+ ///
+ public enum ConcurrentStreamKind
+ {
+ ///
+ ///
+ ///
+ Stt,
+ ///
+ ///
+ ///
+ Tts,
+ }
+
+ ///
+ /// Enum extensions to do fast conversions without the reflection.
+ ///
+ public static class ConcurrentStreamKindExtensions
+ {
+ ///
+ /// Converts an enum to a string.
+ ///
+ public static string ToValueString(this ConcurrentStreamKind value)
+ {
+ return value switch
+ {
+ ConcurrentStreamKind.Stt => "stt",
+ ConcurrentStreamKind.Tts => "tts",
+ _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
+ };
+ }
+ ///
+ /// Converts an string to a enum.
+ ///
+ public static ConcurrentStreamKind? ToEnum(string value)
+ {
+ return value switch
+ {
+ "stt" => ConcurrentStreamKind.Stt,
+ "tts" => ConcurrentStreamKind.Tts,
+ _ => null,
+ };
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.ConcurrentStreamsHistoryEntry.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.ConcurrentStreamsHistoryEntry.Json.g.cs
new file mode 100644
index 0000000..eb6d0ab
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.ConcurrentStreamsHistoryEntry.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class ConcurrentStreamsHistoryEntry
+ {
+ ///
+ /// 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.ConcurrentStreamsHistoryEntry? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.ConcurrentStreamsHistoryEntry),
+ jsonSerializerContext) as global::Soniox.ConcurrentStreamsHistoryEntry;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.ConcurrentStreamsHistoryEntry? 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.ConcurrentStreamsHistoryEntry? 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.ConcurrentStreamsHistoryEntry),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.ConcurrentStreamsHistoryEntry;
+ }
+
+ ///
+ /// 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.ConcurrentStreamsHistoryEntry.g.cs b/src/libs/Soniox/Generated/Soniox.Models.ConcurrentStreamsHistoryEntry.g.cs
new file mode 100644
index 0000000..809caee
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.ConcurrentStreamsHistoryEntry.g.cs
@@ -0,0 +1,119 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ ///
+ ///
+ public sealed partial class ConcurrentStreamsHistoryEntry
+ {
+ ///
+ /// Start of the aggregation period, UTC. Aligned to a multiple of `period_sec`.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("period_start")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.DateTime PeriodStart { get; set; }
+
+ ///
+ /// Aggregation period in seconds.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("period_sec")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int PeriodSec { get; set; }
+
+ ///
+ /// Lowest recorded concurrent stream count in the period. Always `0`, because that is what the per-minute tier records. Use `sample_max` for the peak.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("sample_min")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int SampleMin { get; set; }
+
+ ///
+ /// Peak concurrent stream count in the period. Stays exact when periods are rolled up into hours and days. `0` when the period had no activity.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("sample_max")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int SampleMax { get; set; }
+
+ ///
+ /// Sum of the recorded concurrency values in the period. Divide by `sample_count` for the average concurrency while streams were active, or by `total_count` for the average across the whole period with idle slots counted as zero.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("sample_sum")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int SampleSum { get; set; }
+
+ ///
+ /// Number of values actually recorded in the period. For `period_sec=60` this is how many samples were taken during that minute, so it is usually larger than `total_count`. For hourly and daily periods it is the number of source periods that had data, at most `total_count`. `0` when the period had no activity.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("sample_count")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int SampleCount { get; set; }
+
+ ///
+ /// Number of slots the period covers. `1` for `period_sec=60`, `60` for `3600` (minutes per hour), `24` for `86400` (hours per day). `0` when the period had no activity.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("total_count")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int TotalCount { 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.
+ ///
+ ///
+ /// Start of the aggregation period, UTC. Aligned to a multiple of `period_sec`.
+ ///
+ ///
+ /// Aggregation period in seconds.
+ ///
+ ///
+ /// Lowest recorded concurrent stream count in the period. Always `0`, because that is what the per-minute tier records. Use `sample_max` for the peak.
+ ///
+ ///
+ /// Peak concurrent stream count in the period. Stays exact when periods are rolled up into hours and days. `0` when the period had no activity.
+ ///
+ ///
+ /// Sum of the recorded concurrency values in the period. Divide by `sample_count` for the average concurrency while streams were active, or by `total_count` for the average across the whole period with idle slots counted as zero.
+ ///
+ ///
+ /// Number of values actually recorded in the period. For `period_sec=60` this is how many samples were taken during that minute, so it is usually larger than `total_count`. For hourly and daily periods it is the number of source periods that had data, at most `total_count`. `0` when the period had no activity.
+ ///
+ ///
+ /// Number of slots the period covers. `1` for `period_sec=60`, `60` for `3600` (minutes per hour), `24` for `86400` (hours per day). `0` when the period had no activity.
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public ConcurrentStreamsHistoryEntry(
+ global::System.DateTime periodStart,
+ int periodSec,
+ int sampleMin,
+ int sampleMax,
+ int sampleSum,
+ int sampleCount,
+ int totalCount)
+ {
+ this.PeriodStart = periodStart;
+ this.PeriodSec = periodSec;
+ this.SampleMin = sampleMin;
+ this.SampleMax = sampleMax;
+ this.SampleSum = sampleSum;
+ this.SampleCount = sampleCount;
+ this.TotalCount = totalCount;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ConcurrentStreamsHistoryEntry()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.CreateTTSPayload.g.cs b/src/libs/Soniox/Generated/Soniox.Models.CreateTTSPayload.g.cs
index 83edfa1..517dc3a 100644
--- a/src/libs/Soniox/Generated/Soniox.Models.CreateTTSPayload.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Models.CreateTTSPayload.g.cs
@@ -4,7 +4,7 @@
namespace Soniox
{
///
- /// Example: {"model":"tts-rt-v1","language":"en","voice":"Adrian","audio_format":"wav","text":"Hello from Soniox Text-to-Speech.","sample_rate":24000,"bitrate":128000,"client_reference_id":"some_internal_id","speed":1.2}
+ /// Example: {"model":"tts-rt-v1","language":"en","voice":"Adrian","audio_format":"wav","text":"Hello from Soniox Text-to-Speech.","sample_rate":24000,"bitrate":128000,"client_reference_id":"some_internal_id","speed":1.2,"reduce_silence":true}
///
public sealed partial class CreateTTSPayload
{
@@ -69,6 +69,12 @@ public sealed partial class CreateTTSPayload
[global::System.Text.Json.Serialization.JsonPropertyName("speed")]
public double? Speed { get; set; }
+ ///
+ /// Optional. When `true`, shortens the pauses between words so the generated speech flows more naturally. Defaults to `false`. Only supported on models with `supports_silence_reduction` set to `true`; enabling it on any other model returns an `invalid_request` error.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("reduce_silence")]
+ public bool? ReduceSilence { get; set; }
+
///
/// Additional properties that are not explicitly defined in the schema
///
@@ -106,6 +112,9 @@ public sealed partial class CreateTTSPayload
///
/// Optional speaking rate of the generated speech, from `0.7` to `1.3`. `1.0` is the normal speed; lower values slow speech down and higher values speed it up. Defaults to `1.0`.
///
+ ///
+ /// Optional. When `true`, shortens the pauses between words so the generated speech flows more naturally. Defaults to `false`. Only supported on models with `supports_silence_reduction` set to `true`; enabling it on any other model returns an `invalid_request` error.
+ ///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
@@ -118,7 +127,8 @@ public CreateTTSPayload(
int? sampleRate,
int? bitrate,
string? clientReferenceId,
- double? speed)
+ double? speed,
+ bool? reduceSilence)
{
this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model));
this.Language = language ?? throw new global::System.ArgumentNullException(nameof(language));
@@ -129,6 +139,7 @@ public CreateTTSPayload(
this.Bitrate = bitrate;
this.ClientReferenceId = clientReferenceId;
this.Speed = speed;
+ this.ReduceSilence = reduceSilence;
}
///
diff --git a/src/libs/Soniox/Generated/Soniox.Models.CreateTTSPayloadReduceSilence.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.CreateTTSPayloadReduceSilence.Json.g.cs
new file mode 100644
index 0000000..6f16977
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.CreateTTSPayloadReduceSilence.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class CreateTTSPayloadReduceSilence
+ {
+ ///
+ /// 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.CreateTTSPayloadReduceSilence? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.CreateTTSPayloadReduceSilence),
+ jsonSerializerContext) as global::Soniox.CreateTTSPayloadReduceSilence;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.CreateTTSPayloadReduceSilence? 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.CreateTTSPayloadReduceSilence? 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.CreateTTSPayloadReduceSilence),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.CreateTTSPayloadReduceSilence;
+ }
+
+ ///
+ /// 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.CreateTTSPayloadReduceSilence.g.cs b/src/libs/Soniox/Generated/Soniox.Models.CreateTTSPayloadReduceSilence.g.cs
new file mode 100644
index 0000000..970d0ce
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.CreateTTSPayloadReduceSilence.g.cs
@@ -0,0 +1,19 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ /// Optional. When `true`, shortens the pauses between words so the generated speech flows more naturally. Defaults to `false`. Only supported on models with `supports_silence_reduction` set to `true`; enabling it on any other model returns an `invalid_request` error.
+ ///
+ public sealed partial class CreateTTSPayloadReduceSilence
+ {
+
+ ///
+ /// 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.GetConcurrentStreamsHistoryKind2.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetConcurrentStreamsHistoryKind2.g.cs
new file mode 100644
index 0000000..9f07fb0
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetConcurrentStreamsHistoryKind2.g.cs
@@ -0,0 +1,51 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ ///
+ ///
+ public enum GetConcurrentStreamsHistoryKind2
+ {
+ ///
+ ///
+ ///
+ Stt,
+ ///
+ ///
+ ///
+ Tts,
+ }
+
+ ///
+ /// Enum extensions to do fast conversions without the reflection.
+ ///
+ public static class GetConcurrentStreamsHistoryKind2Extensions
+ {
+ ///
+ /// Converts an enum to a string.
+ ///
+ public static string ToValueString(this GetConcurrentStreamsHistoryKind2 value)
+ {
+ return value switch
+ {
+ GetConcurrentStreamsHistoryKind2.Stt => "stt",
+ GetConcurrentStreamsHistoryKind2.Tts => "tts",
+ _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
+ };
+ }
+ ///
+ /// Converts an string to a enum.
+ ///
+ public static GetConcurrentStreamsHistoryKind2? ToEnum(string value)
+ {
+ return value switch
+ {
+ "stt" => GetConcurrentStreamsHistoryKind2.Stt,
+ "tts" => GetConcurrentStreamsHistoryKind2.Tts,
+ _ => null,
+ };
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.GetConcurrentStreamsHistoryResponse.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetConcurrentStreamsHistoryResponse.Json.g.cs
new file mode 100644
index 0000000..ae97e69
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetConcurrentStreamsHistoryResponse.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class GetConcurrentStreamsHistoryResponse
+ {
+ ///
+ /// 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.GetConcurrentStreamsHistoryResponse? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.GetConcurrentStreamsHistoryResponse),
+ jsonSerializerContext) as global::Soniox.GetConcurrentStreamsHistoryResponse;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.GetConcurrentStreamsHistoryResponse? 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.GetConcurrentStreamsHistoryResponse? 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.GetConcurrentStreamsHistoryResponse),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.GetConcurrentStreamsHistoryResponse;
+ }
+
+ ///
+ /// 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.GetConcurrentStreamsHistoryResponse.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetConcurrentStreamsHistoryResponse.g.cs
new file mode 100644
index 0000000..0ec93a7
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetConcurrentStreamsHistoryResponse.g.cs
@@ -0,0 +1,60 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ ///
+ ///
+ public sealed partial class GetConcurrentStreamsHistoryResponse
+ {
+ ///
+ /// Stream kind these entries describe (`stt` or `tts`).
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("kind")]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Soniox.JsonConverters.ConcurrentStreamKindJsonConverter))]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::Soniox.ConcurrentStreamKind Kind { get; set; }
+
+ ///
+ /// Per-period concurrent stream aggregates for the authenticated project, ordered by `period_start` ascending. Every aggregation period in the requested window is returned, with no gaps. Periods with no recorded activity have every field set to `0`.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("entries")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList Entries { 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.
+ ///
+ ///
+ /// Stream kind these entries describe (`stt` or `tts`).
+ ///
+ ///
+ /// Per-period concurrent stream aggregates for the authenticated project, ordered by `period_start` ascending. Every aggregation period in the requested window is returned, with no gaps. Periods with no recorded activity have every field set to `0`.
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public GetConcurrentStreamsHistoryResponse(
+ global::Soniox.ConcurrentStreamKind kind,
+ global::System.Collections.Generic.IList entries)
+ {
+ this.Kind = kind;
+ this.Entries = entries ?? throw new global::System.ArgumentNullException(nameof(entries));
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetConcurrentStreamsHistoryResponse()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.GetUsageSummaryResponse.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetUsageSummaryResponse.Json.g.cs
new file mode 100644
index 0000000..2487ccc
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetUsageSummaryResponse.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class GetUsageSummaryResponse
+ {
+ ///
+ /// 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.GetUsageSummaryResponse? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.GetUsageSummaryResponse),
+ jsonSerializerContext) as global::Soniox.GetUsageSummaryResponse;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.GetUsageSummaryResponse? 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.GetUsageSummaryResponse? 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.GetUsageSummaryResponse),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.GetUsageSummaryResponse;
+ }
+
+ ///
+ /// 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.GetUsageSummaryResponse.g.cs b/src/libs/Soniox/Generated/Soniox.Models.GetUsageSummaryResponse.g.cs
new file mode 100644
index 0000000..e3c02e2
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.GetUsageSummaryResponse.g.cs
@@ -0,0 +1,59 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ ///
+ ///
+ public sealed partial class GetUsageSummaryResponse
+ {
+ ///
+ /// Cost and activity across all models. Its `model` is `null`.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("total")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::Soniox.UsageSummaryEntry Total { get; set; }
+
+ ///
+ /// One entry per model that recorded usage in the window. Empty when the project had no usage.
+ ///
+ [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.
+ ///
+ ///
+ /// Cost and activity across all models. Its `model` is `null`.
+ ///
+ ///
+ /// One entry per model that recorded usage in the window. Empty when the project had no usage.
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public GetUsageSummaryResponse(
+ global::Soniox.UsageSummaryEntry total,
+ global::System.Collections.Generic.IList models)
+ {
+ this.Total = total ?? throw new global::System.ArgumentNullException(nameof(total));
+ this.Models = models ?? throw new global::System.ArgumentNullException(nameof(models));
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetUsageSummaryResponse()
+ {
+ }
+
+ }
+}
\ 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 c17da66..c30cfb2 100644
--- a/src/libs/Soniox/Generated/Soniox.Models.TTSModel.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Models.TTSModel.g.cs
@@ -69,6 +69,13 @@ public sealed partial class TTSModel
[global::System.Text.Json.Serialization.JsonRequired]
public required double SpeedMax { get; set; }
+ ///
+ /// Whether the model supports shortening the pauses between words via the `reduce_silence` parameter.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("supports_silence_reduction")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required bool SupportsSilenceReduction { get; set; }
+
///
/// Additional properties that are not explicitly defined in the schema
///
@@ -99,6 +106,9 @@ public sealed partial class TTSModel
///
/// Maximum supported speaking rate.
///
+ ///
+ /// Whether the model supports shortening the pauses between words via the `reduce_silence` parameter.
+ ///
///
/// If this is an alias, the id of the aliased model.
///
@@ -114,6 +124,7 @@ public TTSModel(
bool supportsSpeedAdjustment,
double speedMin,
double speedMax,
+ bool supportsSilenceReduction,
string? aliasedModelId,
bool? supportsTimestamps)
{
@@ -126,6 +137,7 @@ public TTSModel(
this.SupportsSpeedAdjustment = supportsSpeedAdjustment;
this.SpeedMin = speedMin;
this.SpeedMax = speedMax;
+ this.SupportsSilenceReduction = supportsSilenceReduction;
}
///
diff --git a/src/libs/Soniox/Generated/Soniox.Models.UsageLogEntry.g.cs b/src/libs/Soniox/Generated/Soniox.Models.UsageLogEntry.g.cs
index a9c9a84..bd83ead 100644
--- a/src/libs/Soniox/Generated/Soniox.Models.UsageLogEntry.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Models.UsageLogEntry.g.cs
@@ -96,57 +96,50 @@ public sealed partial class UsageLogEntry
///
///
[global::System.Text.Json.Serialization.JsonPropertyName("cost_usd")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Soniox.JsonConverters.AnyOfJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
- public required global::Soniox.AnyOf CostUsd { get; set; }
+ public required string CostUsd { get; set; }
///
///
///
[global::System.Text.Json.Serialization.JsonPropertyName("input_cost_usd")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Soniox.JsonConverters.AnyOfJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
- public required global::Soniox.AnyOf InputCostUsd { get; set; }
+ public required string InputCostUsd { get; set; }
///
///
///
[global::System.Text.Json.Serialization.JsonPropertyName("input_text_cost_usd")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Soniox.JsonConverters.AnyOfJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
- public required global::Soniox.AnyOf InputTextCostUsd { get; set; }
+ public required string InputTextCostUsd { get; set; }
///
///
///
[global::System.Text.Json.Serialization.JsonPropertyName("input_audio_cost_usd")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Soniox.JsonConverters.AnyOfJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
- public required global::Soniox.AnyOf InputAudioCostUsd { get; set; }
+ public required string InputAudioCostUsd { get; set; }
///
///
///
[global::System.Text.Json.Serialization.JsonPropertyName("output_cost_usd")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Soniox.JsonConverters.AnyOfJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
- public required global::Soniox.AnyOf OutputCostUsd { get; set; }
+ public required string OutputCostUsd { get; set; }
///
///
///
[global::System.Text.Json.Serialization.JsonPropertyName("output_text_cost_usd")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Soniox.JsonConverters.AnyOfJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
- public required global::Soniox.AnyOf OutputTextCostUsd { get; set; }
+ public required string OutputTextCostUsd { get; set; }
///
///
///
[global::System.Text.Json.Serialization.JsonPropertyName("output_audio_cost_usd")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Soniox.JsonConverters.AnyOfJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
- public required global::Soniox.AnyOf OutputAudioCostUsd { get; set; }
+ public required string OutputAudioCostUsd { get; set; }
///
/// Additional properties that are not explicitly defined in the schema
@@ -204,13 +197,13 @@ public UsageLogEntry(
int outputTextTokens,
int outputAudioTokens,
int outputAudioDurationMs,
- global::Soniox.AnyOf costUsd,
- global::Soniox.AnyOf inputCostUsd,
- global::Soniox.AnyOf inputTextCostUsd,
- global::Soniox.AnyOf inputAudioCostUsd,
- global::Soniox.AnyOf outputCostUsd,
- global::Soniox.AnyOf outputTextCostUsd,
- global::Soniox.AnyOf outputAudioCostUsd)
+ string costUsd,
+ string inputCostUsd,
+ string inputTextCostUsd,
+ string inputAudioCostUsd,
+ string outputCostUsd,
+ string outputTextCostUsd,
+ string outputAudioCostUsd)
{
this.Uuid = uuid;
this.RequestScope = requestScope ?? throw new global::System.ArgumentNullException(nameof(requestScope));
@@ -224,13 +217,13 @@ public UsageLogEntry(
this.OutputTextTokens = outputTextTokens;
this.OutputAudioTokens = outputAudioTokens;
this.OutputAudioDurationMs = outputAudioDurationMs;
- this.CostUsd = costUsd;
- this.InputCostUsd = inputCostUsd;
- this.InputTextCostUsd = inputTextCostUsd;
- this.InputAudioCostUsd = inputAudioCostUsd;
- this.OutputCostUsd = outputCostUsd;
- this.OutputTextCostUsd = outputTextCostUsd;
- this.OutputAudioCostUsd = outputAudioCostUsd;
+ this.CostUsd = costUsd ?? throw new global::System.ArgumentNullException(nameof(costUsd));
+ this.InputCostUsd = inputCostUsd ?? throw new global::System.ArgumentNullException(nameof(inputCostUsd));
+ this.InputTextCostUsd = inputTextCostUsd ?? throw new global::System.ArgumentNullException(nameof(inputTextCostUsd));
+ this.InputAudioCostUsd = inputAudioCostUsd ?? throw new global::System.ArgumentNullException(nameof(inputAudioCostUsd));
+ this.OutputCostUsd = outputCostUsd ?? throw new global::System.ArgumentNullException(nameof(outputCostUsd));
+ this.OutputTextCostUsd = outputTextCostUsd ?? throw new global::System.ArgumentNullException(nameof(outputTextCostUsd));
+ this.OutputAudioCostUsd = outputAudioCostUsd ?? throw new global::System.ArgumentNullException(nameof(outputAudioCostUsd));
}
///
diff --git a/src/libs/Soniox/Generated/Soniox.AnyOf.2.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.UsageSummaryEntry.Json.g.cs
similarity index 89%
rename from src/libs/Soniox/Generated/Soniox.AnyOf.2.Json.g.cs
rename to src/libs/Soniox/Generated/Soniox.Models.UsageSummaryEntry.Json.g.cs
index 087e6d1..8b42146 100644
--- a/src/libs/Soniox/Generated/Soniox.AnyOf.2.Json.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Models.UsageSummaryEntry.Json.g.cs
@@ -2,7 +2,7 @@
namespace Soniox
{
- public readonly partial struct AnyOf
+ public sealed partial class UsageSummaryEntry
{
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
@@ -47,20 +47,20 @@ public string ToJson(
///
/// Deserializes a JSON string using the provided JsonSerializerContext.
///
- public static global::Soniox.AnyOf? FromJson(
+ public static global::Soniox.UsageSummaryEntry? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
- typeof(global::Soniox.AnyOf),
- jsonSerializerContext) as global::Soniox.AnyOf?;
+ typeof(global::Soniox.UsageSummaryEntry),
+ jsonSerializerContext) as global::Soniox.UsageSummaryEntry;
}
///
/// Deserializes a JSON string using the generated default JsonSerializerContext.
///
- public static global::Soniox.AnyOf? FromJson(
+ public static global::Soniox.UsageSummaryEntry? FromJson(
string json)
{
return FromJson(
@@ -75,7 +75,7 @@ public string ToJson(
[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.AnyOf? FromJson(
+ public static global::Soniox.UsageSummaryEntry? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
@@ -86,7 +86,7 @@ public string ToJson(
global::Soniox.SourceGenerationContext.Default);
}
- return global::System.Text.Json.JsonSerializer.Deserialize>(
+ return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
}
@@ -94,20 +94,20 @@ public string ToJson(
///
/// Deserializes a JSON stream using the provided JsonSerializerContext.
///
- public static async global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync(
+ 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.AnyOf),
- jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.AnyOf?;
+ typeof(global::Soniox.UsageSummaryEntry),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.UsageSummaryEntry;
}
///
/// Deserializes a JSON stream using the generated default JsonSerializerContext.
///
- public static global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync(
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
global::System.IO.Stream jsonStream)
{
return FromJsonStreamAsync(
@@ -122,7 +122,7 @@ public string ToJson(
[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(
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
@@ -133,7 +133,7 @@ public string ToJson(
global::Soniox.SourceGenerationContext.Default);
}
- return global::System.Text.Json.JsonSerializer.DeserializeAsync?>(
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
}
diff --git a/src/libs/Soniox/Generated/Soniox.Models.UsageSummaryEntry.g.cs b/src/libs/Soniox/Generated/Soniox.Models.UsageSummaryEntry.g.cs
new file mode 100644
index 0000000..79ec467
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.UsageSummaryEntry.g.cs
@@ -0,0 +1,322 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ ///
+ ///
+ public sealed partial class UsageSummaryEntry
+ {
+ ///
+ /// Model identifier. `null` on the `total` entry.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("model")]
+ public string? Model { get; set; }
+
+ ///
+ /// One UTC day (`YYYY-MM-DD`) per element, in ascending order. Every day in the requested window is present, including days with no usage. All the per-day arrays below align to this axis.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("days")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList Days { get; set; }
+
+ ///
+ /// Total cost over the window, in USD. Equals `total_input_cost_usd` + `total_output_cost_usd` + `total_duration_cost_usd`.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("total_cost_usd")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string TotalCostUsd { get; set; }
+
+ ///
+ /// Total cost of input tokens over the window, in USD.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("total_input_cost_usd")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string TotalInputCostUsd { get; set; }
+
+ ///
+ /// Total cost of output tokens over the window, in USD.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("total_output_cost_usd")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string TotalOutputCostUsd { get; set; }
+
+ ///
+ /// Total cost over the window for models billed by session duration rather than by tokens, in USD. `0` for Speech-to-Text and Text-to-Speech models.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("total_duration_cost_usd")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string TotalDurationCostUsd { get; set; }
+
+ ///
+ /// Cost per day, in USD, aligned to `days`.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("cost_usd")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList CostUsd { get; set; }
+
+ ///
+ /// Cost of input tokens per day, in USD, aligned to `days`.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("input_cost_usd")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList InputCostUsd { get; set; }
+
+ ///
+ /// Cost of output tokens per day, in USD, aligned to `days`.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("output_cost_usd")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList OutputCostUsd { get; set; }
+
+ ///
+ /// Duration-billed cost per day, in USD, aligned to `days`.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("duration_cost_usd")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList DurationCostUsd { get; set; }
+
+ ///
+ /// Number of requests over the window.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("total_num_requests")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int TotalNumRequests { get; set; }
+
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("total_input_text_tokens")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int TotalInputTextTokens { get; set; }
+
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("total_input_audio_tokens")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int TotalInputAudioTokens { get; set; }
+
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("total_input_audio_duration_ms")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int TotalInputAudioDurationMs { get; set; }
+
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("total_output_text_tokens")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int TotalOutputTextTokens { get; set; }
+
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("total_output_audio_tokens")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int TotalOutputAudioTokens { get; set; }
+
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("total_output_audio_duration_ms")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int TotalOutputAudioDurationMs { get; set; }
+
+ ///
+ /// Billed session duration over the window, in milliseconds, for models billed by duration. `0` for Speech-to-Text and Text-to-Speech models.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("total_duration_ms")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int TotalDurationMs { get; set; }
+
+ ///
+ /// Number of requests per day, aligned to `days`.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("num_requests")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList NumRequests { get; set; }
+
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("input_text_tokens")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList InputTextTokens { get; set; }
+
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("input_audio_tokens")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList InputAudioTokens { get; set; }
+
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("input_audio_duration_ms")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList InputAudioDurationMs { get; set; }
+
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("output_text_tokens")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList OutputTextTokens { get; set; }
+
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("output_audio_tokens")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList OutputAudioTokens { get; set; }
+
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("output_audio_duration_ms")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList OutputAudioDurationMs { get; set; }
+
+ ///
+ /// Billed session duration per day, in milliseconds, aligned to `days`.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("duration_ms")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.Collections.Generic.IList DurationMs { 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.
+ ///
+ ///
+ /// One UTC day (`YYYY-MM-DD`) per element, in ascending order. Every day in the requested window is present, including days with no usage. All the per-day arrays below align to this axis.
+ ///
+ ///
+ /// Total cost over the window, in USD. Equals `total_input_cost_usd` + `total_output_cost_usd` + `total_duration_cost_usd`.
+ ///
+ ///
+ /// Total cost of input tokens over the window, in USD.
+ ///
+ ///
+ /// Total cost of output tokens over the window, in USD.
+ ///
+ ///
+ /// Total cost over the window for models billed by session duration rather than by tokens, in USD. `0` for Speech-to-Text and Text-to-Speech models.
+ ///
+ ///
+ /// Cost per day, in USD, aligned to `days`.
+ ///
+ ///
+ /// Cost of input tokens per day, in USD, aligned to `days`.
+ ///
+ ///
+ /// Cost of output tokens per day, in USD, aligned to `days`.
+ ///
+ ///
+ /// Duration-billed cost per day, in USD, aligned to `days`.
+ ///
+ ///
+ /// Number of requests over the window.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Billed session duration over the window, in milliseconds, for models billed by duration. `0` for Speech-to-Text and Text-to-Speech models.
+ ///
+ ///
+ /// Number of requests per day, aligned to `days`.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Billed session duration per day, in milliseconds, aligned to `days`.
+ ///
+ ///
+ /// Model identifier. `null` on the `total` entry.
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public UsageSummaryEntry(
+ global::System.Collections.Generic.IList days,
+ string totalCostUsd,
+ string totalInputCostUsd,
+ string totalOutputCostUsd,
+ string totalDurationCostUsd,
+ global::System.Collections.Generic.IList costUsd,
+ global::System.Collections.Generic.IList inputCostUsd,
+ global::System.Collections.Generic.IList outputCostUsd,
+ global::System.Collections.Generic.IList durationCostUsd,
+ int totalNumRequests,
+ int totalInputTextTokens,
+ int totalInputAudioTokens,
+ int totalInputAudioDurationMs,
+ int totalOutputTextTokens,
+ int totalOutputAudioTokens,
+ int totalOutputAudioDurationMs,
+ int totalDurationMs,
+ global::System.Collections.Generic.IList numRequests,
+ global::System.Collections.Generic.IList inputTextTokens,
+ global::System.Collections.Generic.IList inputAudioTokens,
+ global::System.Collections.Generic.IList inputAudioDurationMs,
+ global::System.Collections.Generic.IList outputTextTokens,
+ global::System.Collections.Generic.IList outputAudioTokens,
+ global::System.Collections.Generic.IList outputAudioDurationMs,
+ global::System.Collections.Generic.IList durationMs,
+ string? model)
+ {
+ this.Model = model;
+ this.Days = days ?? throw new global::System.ArgumentNullException(nameof(days));
+ this.TotalCostUsd = totalCostUsd ?? throw new global::System.ArgumentNullException(nameof(totalCostUsd));
+ this.TotalInputCostUsd = totalInputCostUsd ?? throw new global::System.ArgumentNullException(nameof(totalInputCostUsd));
+ this.TotalOutputCostUsd = totalOutputCostUsd ?? throw new global::System.ArgumentNullException(nameof(totalOutputCostUsd));
+ this.TotalDurationCostUsd = totalDurationCostUsd ?? throw new global::System.ArgumentNullException(nameof(totalDurationCostUsd));
+ this.CostUsd = costUsd ?? throw new global::System.ArgumentNullException(nameof(costUsd));
+ this.InputCostUsd = inputCostUsd ?? throw new global::System.ArgumentNullException(nameof(inputCostUsd));
+ this.OutputCostUsd = outputCostUsd ?? throw new global::System.ArgumentNullException(nameof(outputCostUsd));
+ this.DurationCostUsd = durationCostUsd ?? throw new global::System.ArgumentNullException(nameof(durationCostUsd));
+ this.TotalNumRequests = totalNumRequests;
+ this.TotalInputTextTokens = totalInputTextTokens;
+ this.TotalInputAudioTokens = totalInputAudioTokens;
+ this.TotalInputAudioDurationMs = totalInputAudioDurationMs;
+ this.TotalOutputTextTokens = totalOutputTextTokens;
+ this.TotalOutputAudioTokens = totalOutputAudioTokens;
+ this.TotalOutputAudioDurationMs = totalOutputAudioDurationMs;
+ this.TotalDurationMs = totalDurationMs;
+ this.NumRequests = numRequests ?? throw new global::System.ArgumentNullException(nameof(numRequests));
+ this.InputTextTokens = inputTextTokens ?? throw new global::System.ArgumentNullException(nameof(inputTextTokens));
+ this.InputAudioTokens = inputAudioTokens ?? throw new global::System.ArgumentNullException(nameof(inputAudioTokens));
+ this.InputAudioDurationMs = inputAudioDurationMs ?? throw new global::System.ArgumentNullException(nameof(inputAudioDurationMs));
+ this.OutputTextTokens = outputTextTokens ?? throw new global::System.ArgumentNullException(nameof(outputTextTokens));
+ this.OutputAudioTokens = outputAudioTokens ?? throw new global::System.ArgumentNullException(nameof(outputAudioTokens));
+ this.OutputAudioDurationMs = outputAudioDurationMs ?? throw new global::System.ArgumentNullException(nameof(outputAudioDurationMs));
+ this.DurationMs = durationMs ?? throw new global::System.ArgumentNullException(nameof(durationMs));
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public UsageSummaryEntry()
+ {
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Models.UsageSummaryEntryModel.Json.g.cs b/src/libs/Soniox/Generated/Soniox.Models.UsageSummaryEntryModel.Json.g.cs
new file mode 100644
index 0000000..97dccca
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.UsageSummaryEntryModel.Json.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+namespace Soniox
+{
+ public sealed partial class UsageSummaryEntryModel
+ {
+ ///
+ /// 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.UsageSummaryEntryModel? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Soniox.UsageSummaryEntryModel),
+ jsonSerializerContext) as global::Soniox.UsageSummaryEntryModel;
+ }
+
+ ///
+ /// Deserializes a JSON string using the generated default JsonSerializerContext.
+ ///
+ public static global::Soniox.UsageSummaryEntryModel? 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.UsageSummaryEntryModel? 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.UsageSummaryEntryModel),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Soniox.UsageSummaryEntryModel;
+ }
+
+ ///
+ /// 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.UsageSummaryEntryModel.g.cs b/src/libs/Soniox/Generated/Soniox.Models.UsageSummaryEntryModel.g.cs
new file mode 100644
index 0000000..2fda55b
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Models.UsageSummaryEntryModel.g.cs
@@ -0,0 +1,19 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ ///
+ /// Model identifier. `null` on the `total` entry.
+ ///
+ public sealed partial class UsageSummaryEntryModel
+ {
+
+ ///
+ /// 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.SonioxClient.g.cs b/src/libs/Soniox/Generated/Soniox.SonioxClient.g.cs
index 9da6b52..1d5b3fb 100644
--- a/src/libs/Soniox/Generated/Soniox.SonioxClient.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.SonioxClient.g.cs
@@ -62,6 +62,16 @@ public sealed partial class SonioxClient : global::Soniox.ISonioxClient, global:
AutoSDKServerConfiguration = AutoSDKServerConfiguration,
};
+ ///
+ ///
+ ///
+ public ConcurrentStreamsHistoryClient ConcurrentStreamsHistory => new ConcurrentStreamsHistoryClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
+ {
+ ReadResponseAsString = ReadResponseAsString,
+ JsonSerializerContext = JsonSerializerContext,
+ AutoSDKServerConfiguration = AutoSDKServerConfiguration,
+ };
+
///
///
///
@@ -122,6 +132,16 @@ public sealed partial class SonioxClient : global::Soniox.ISonioxClient, global:
AutoSDKServerConfiguration = AutoSDKServerConfiguration,
};
+ ///
+ ///
+ ///
+ public UsageSummaryClient UsageSummary => new UsageSummaryClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
+ {
+ ReadResponseAsString = ReadResponseAsString,
+ JsonSerializerContext = JsonSerializerContext,
+ AutoSDKServerConfiguration = AutoSDKServerConfiguration,
+ };
+
///
///
///
diff --git a/src/libs/Soniox/Generated/Soniox.TtsClient.GenerateTts.g.cs b/src/libs/Soniox/Generated/Soniox.TtsClient.GenerateTts.g.cs
index c1eaf4c..3cab3fe 100644
--- a/src/libs/Soniox/Generated/Soniox.TtsClient.GenerateTts.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.TtsClient.GenerateTts.g.cs
@@ -1411,6 +1411,9 @@ partial void ProcessGenerateTtsResponseContent(
///
/// Optional speaking rate of the generated speech, from `0.7` to `1.3`. `1.0` is the normal speed; lower values slow speech down and higher values speed it up. Defaults to `1.0`.
///
+ ///
+ /// Optional. When `true`, shortens the pauses between words so the generated speech flows more naturally. Defaults to `false`. Only supported on models with `supports_silence_reduction` set to `true`; enabling it on any other model returns an `invalid_request` error.
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -1425,6 +1428,7 @@ partial void ProcessGenerateTtsResponseContent(
int? bitrate = default,
string? clientReferenceId = default,
double? speed = default,
+ bool? reduceSilence = default,
global::Soniox.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -1439,6 +1443,7 @@ partial void ProcessGenerateTtsResponseContent(
Bitrate = bitrate,
ClientReferenceId = clientReferenceId,
Speed = speed,
+ ReduceSilence = reduceSilence,
};
return await GenerateTtsAsync(
diff --git a/src/libs/Soniox/Generated/Soniox.UsageSummaryClient.GetUsageSummary.g.cs b/src/libs/Soniox/Generated/Soniox.UsageSummaryClient.GetUsageSummary.g.cs
new file mode 100644
index 0000000..927b38f
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.UsageSummaryClient.GetUsageSummary.g.cs
@@ -0,0 +1,634 @@
+
+#nullable enable
+
+namespace Soniox
+{
+ public partial class UsageSummaryClient
+ {
+
+
+ private static readonly global::Soniox.EndPointSecurityRequirement s_GetUsageSummarySecurityRequirement0 =
+ 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_GetUsageSummarySecurityRequirements =
+ new global::Soniox.EndPointSecurityRequirement[]
+ { s_GetUsageSummarySecurityRequirement0,
+ };
+ partial void PrepareGetUsageSummaryArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string startTime,
+ ref string endTime);
+ partial void PrepareGetUsageSummaryRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string startTime,
+ string endTime);
+ partial void ProcessGetUsageSummaryResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetUsageSummaryResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get usage summary
+ /// Returns daily cost and activity for the project, broken down per model and summed across all models. The project is implied by the API key used for authentication.
+ /// Usage is aggregated by whole UTC day. The window is half-open, `[start_time, end_time)`, and a day is included when the window covers any part of it, so an `end_time` exactly at midnight excludes that day. The window must not cover more than 366 UTC days.
+ ///
+ ///
+ /// Start of the window (inclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-01T00:00:00Z`). Its UTC day is included.
+ ///
+ ///
+ /// End of the window (exclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-03T00:00:00Z`) and strictly after `start_time`. Its UTC day is included unless it falls exactly on midnight.
+ ///
+ /// 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 GetUsageSummaryAsync(
+ string startTime,
+ string endTime,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetUsageSummaryAsResponseAsync(
+ startTime: startTime,
+ endTime: endTime,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get usage summary
+ /// Returns daily cost and activity for the project, broken down per model and summed across all models. The project is implied by the API key used for authentication.
+ /// Usage is aggregated by whole UTC day. The window is half-open, `[start_time, end_time)`, and a day is included when the window covers any part of it, so an `end_time` exactly at midnight excludes that day. The window must not cover more than 366 UTC days.
+ ///
+ ///
+ /// Start of the window (inclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-01T00:00:00Z`). Its UTC day is included.
+ ///
+ ///
+ /// End of the window (exclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-03T00:00:00Z`) and strictly after `start_time`. Its UTC day is included unless it falls exactly on midnight.
+ ///
+ /// 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> GetUsageSummaryAsResponseAsync(
+ string startTime,
+ string endTime,
+ global::Soniox.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetUsageSummaryArguments(
+ httpClient: HttpClient,
+ startTime: ref startTime,
+ endTime: ref endTime);
+
+
+ var __authorizations = global::Soniox.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetUsageSummarySecurityRequirements,
+ operationName: "GetUsageSummaryAsync");
+
+ 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/usage/summary",
+ baseUri: HttpClient.BaseAddress);
+ __pathBuilder
+ .AddRequiredParameter("start_time", startTime)
+ .AddRequiredParameter("end_time", endTime)
+ ;
+ 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);
+ PrepareGetUsageSummaryRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ startTime: startTime!,
+ endTime: endTime!);
+
+ 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: "GetUsageSummary",
+ methodName: "GetUsageSummaryAsync",
+ pathTemplate: "\"/v1/usage/summary\"",
+ 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: "GetUsageSummary",
+ methodName: "GetUsageSummaryAsync",
+ pathTemplate: "\"/v1/usage/summary\"",
+ 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: "GetUsageSummary",
+ methodName: "GetUsageSummaryAsync",
+ pathTemplate: "\"/v1/usage/summary\"",
+ 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);
+ ProcessGetUsageSummaryResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Soniox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Soniox.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetUsageSummary",
+ methodName: "GetUsageSummaryAsync",
+ pathTemplate: "\"/v1/usage/summary\"",
+ 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: "GetUsageSummary",
+ methodName: "GetUsageSummaryAsync",
+ pathTemplate: "\"/v1/usage/summary\"",
+ 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);
+ }
+ // Invalid request. Error types: - `invalid_request`: A query parameter is missing or invalid. Common causes: `start_time` / `end_time` not parseable as ISO 8601, `end_time` not strictly after `start_time`, or the window covers more than 366 UTC days.
+ 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));
+ }
+ // Authentication error.
+ 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. Error types: - `not_found`: The project could not be resolved while collecting its usage. Retry, and contact support if it persists.
+ 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));
+ }
+ // Rate / capacity limit exceeded. Error types: - `limit_exceeded`: The caller hit a per-minute request rate or other capacity limit. The `message` describes which limit was hit.
+ 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);
+ ProcessGetUsageSummaryResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Soniox.GetUsageSummaryResponse.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.GetUsageSummaryResponse.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.UsageSummaryClient.g.cs b/src/libs/Soniox/Generated/Soniox.UsageSummaryClient.g.cs
new file mode 100644
index 0000000..0eda299
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.UsageSummaryClient.g.cs
@@ -0,0 +1,144 @@
+
+#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 UsageSummaryClient : global::Soniox.IUsageSummaryClient, 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; }
+
+
+ internal global::Soniox.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::Soniox.AutoSDKServerConfiguration();
+ ///
+ ///
+ ///
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Soniox.SourceGenerationContext.Default;
+
+
+ ///
+ /// Creates a new instance of the UsageSummaryClient.
+ /// 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 UsageSummaryClient(
+ 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 UsageSummaryClient 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 UsageSummaryClient(
+ 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 UsageSummaryClient.
+ /// 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 UsageSummaryClient(
+ 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();
+ if (baseUri is not null)
+ {
+ HttpClient.BaseAddress ??= baseUri;
+ }
+ Authorizations = authorizations ?? new global::System.Collections.Generic.List();
+ Options = options ?? new global::Soniox.AutoSDKClientOptions();
+ _disposeHttpClient = disposeHttpClient;
+
+ AutoSDKServerConfiguration.ExplicitBaseUri = baseUri ?? httpClient?.BaseAddress;
+
+ Initialized(HttpClient);
+ }
+
+ ///
+ public void Dispose()
+ {
+ if (_disposeHttpClient)
+ {
+ HttpClient.Dispose();
+ }
+ }
+
+ partial void Initialized(
+ global::System.Net.Http.HttpClient client);
+ partial void PrepareArguments(
+ global::System.Net.Http.HttpClient client);
+ partial void PrepareRequest(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpRequestMessage request);
+ partial void ProcessResponse(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpResponseMessage response);
+ partial void ProcessResponseContent(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpResponseMessage response,
+ ref string content);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/autosdk.generated-examples.json b/src/libs/Soniox/Generated/autosdk.generated-examples.json
index 9cfccf5..1a82749 100644
--- a/src/libs/Soniox/Generated/autosdk.generated-examples.json
+++ b/src/libs/Soniox/Generated/autosdk.generated-examples.json
@@ -24,6 +24,17 @@
},
{
"Order": 3,
+ "Title": "Get concurrent streams history",
+ "Slug": "get-concurrent-streams-history",
+ "Description": "Returns historical concurrent stream counts for the project, aggregated per period. The project is implied by the API key used for authentication. Region-scoped.\n\nEvery aggregation period in the requested window is returned, with no gaps. Periods with no recorded activity have every field set to \u00600\u0060.",
+ "Language": "http",
+ "Code": "### Get concurrent streams history\n# @name get_concurrent_streams_history\nGET {{host}}/v1/concurrent-streams-history?start_time={{start_time}}\u0026end_time={{end_time}}\u0026period_sec=60\u0026kind={{kind}}\nAuthorization: Bearer {{token}}\nAccept: application/json\n\n## Responses\n# 200\n# Description: Per-period concurrent stream aggregates.\n# Content-Type: application/json\n# 400\n# Description: Invalid request.\n\nError types:\n- \u0060invalid_request\u0060: A query parameter is missing or invalid. Common causes: \u0060period_sec\u0060 is not one of \u006060\u0060, \u00603600\u0060, \u006086400\u0060, \u0060start_time\u0060 / \u0060end_time\u0060 not parseable as ISO 8601, \u0060end_time\u0060 not strictly after \u0060start_time\u0060, the window between them exceeds the maximum for the requested \u0060period_sec\u0060, or the window would return more than 20000 entries.\n\n# Content-Type: application/json\n# 401\n# Description: Authentication error.\n# Content-Type: application/json\n# 429\n# Description: Rate / capacity limit exceeded.\n\nError types:\n- \u0060limit_exceeded\u0060: The caller hit a per-minute request rate or other capacity limit. The \u0060message\u0060 describes which limit was hit.\n\n# Content-Type: application/json\n# 500\n# Description: Internal server error.\n# Content-Type: application/json",
+ "Format": "http",
+ "OperationId": "get_concurrent_streams_history",
+ "Setup": null
+ },
+ {
+ "Order": 4,
"Title": "Delete file",
"Slug": "delete-file",
"Description": "Permanently deletes specified file.",
@@ -34,7 +45,7 @@
"Setup": null
},
{
- "Order": 4,
+ "Order": 5,
"Title": "Get file",
"Slug": "get-file",
"Description": "Retrieve metadata for an uploaded file.",
@@ -45,7 +56,7 @@
"Setup": null
},
{
- "Order": 5,
+ "Order": 6,
"Title": "Get files",
"Slug": "get-files",
"Description": "Retrieves list of uploaded files.",
@@ -56,7 +67,7 @@
"Setup": "This example assumes \u0060using Soniox;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 6,
+ "Order": 7,
"Title": "Get files count",
"Slug": "get-files-count",
"Description": "Returns the total number of files, split by source.",
@@ -67,7 +78,7 @@
"Setup": "This example assumes \u0060using Soniox;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 7,
+ "Order": 8,
"Title": "Upload file",
"Slug": "upload-file",
"Description": "Uploads a new file.",
@@ -78,7 +89,7 @@
"Setup": null
},
{
- "Order": 8,
+ "Order": 9,
"Title": "Get models",
"Slug": "get-models",
"Description": "Retrieves list of available models and their attributes.",
@@ -89,7 +100,7 @@
"Setup": "This example assumes \u0060using Soniox;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 9,
+ "Order": 10,
"Title": "Create transcription",
"Slug": "create-transcription",
"Description": "Creates a new transcription.",
@@ -100,7 +111,7 @@
"Setup": null
},
{
- "Order": 10,
+ "Order": 11,
"Title": "Delete transcription",
"Slug": "delete-transcription",
"Description": "Permanently deletes a transcription and its associated files. Cannot delete transcriptions that are currently processing.",
@@ -111,7 +122,7 @@
"Setup": null
},
{
- "Order": 11,
+ "Order": 12,
"Title": "Get transcription",
"Slug": "get-transcription",
"Description": "Retrieves detailed information about a specific transcription.",
@@ -122,7 +133,7 @@
"Setup": null
},
{
- "Order": 12,
+ "Order": 13,
"Title": "Get transcription transcript",
"Slug": "get-transcription-transcript",
"Description": "Retrieves the full transcript text and detailed tokens for a completed transcription. Only available for successfully completed transcriptions.",
@@ -133,7 +144,7 @@
"Setup": null
},
{
- "Order": 13,
+ "Order": 14,
"Title": "Get transcriptions",
"Slug": "get-transcriptions",
"Description": "Retrieves list of transcriptions.",
@@ -144,7 +155,7 @@
"Setup": "This example assumes \u0060using Soniox;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 14,
+ "Order": 15,
"Title": "Get transcriptions count",
"Slug": "get-transcriptions-count",
"Description": "Returns the total number of transcriptions, split by request scope.",
@@ -155,7 +166,7 @@
"Setup": "This example assumes \u0060using Soniox;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 15,
+ "Order": 16,
"Title": "Generate speech",
"Slug": "generate-tts",
"Description": "Generates audio from text using the TTS REST endpoint.",
@@ -166,7 +177,7 @@
"Setup": "This example assumes \u0060using Soniox;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 16,
+ "Order": 17,
"Title": "Get TTS models",
"Slug": "get-tts-models",
"Description": "Retrieves list of available TTS models and their attributes.",
@@ -177,7 +188,7 @@
"Setup": "This example assumes \u0060using Soniox;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."
},
{
- "Order": 17,
+ "Order": 18,
"Title": "Get usage logs",
"Slug": "get-usage-logs",
"Description": "Returns per-request usage log entries for the project. The project is implied by the API key used for authentication. Filters by request end time. The window between start_time and end_time must not exceed 31 days. start_time must not be earlier than 91 days ago.",
@@ -186,6 +197,17 @@
"Format": "http",
"OperationId": "get_usage_logs",
"Setup": null
+ },
+ {
+ "Order": 19,
+ "Title": "Get usage summary",
+ "Slug": "get-usage-summary",
+ "Description": "Returns daily cost and activity for the project, broken down per model and summed across all models. The project is implied by the API key used for authentication.\n\nUsage is aggregated by whole UTC day. The window is half-open, \u0060[start_time, end_time)\u0060, and a day is included when the window covers any part of it, so an \u0060end_time\u0060 exactly at midnight excludes that day. The window must not cover more than 366 UTC days.",
+ "Language": "http",
+ "Code": "### Get usage summary\n# @name get_usage_summary\nGET {{host}}/v1/usage/summary?start_time={{start_time}}\u0026end_time={{end_time}}\nAuthorization: Bearer {{token}}\nAccept: application/json\n\n## Responses\n# 200\n# Description: Daily cost and activity aggregates.\n# Content-Type: application/json\n# 400\n# Description: Invalid request.\n\nError types:\n- \u0060invalid_request\u0060: A query parameter is missing or invalid. Common causes: \u0060start_time\u0060 / \u0060end_time\u0060 not parseable as ISO 8601, \u0060end_time\u0060 not strictly after \u0060start_time\u0060, or the window covers more than 366 UTC days.\n\n# Content-Type: application/json\n# 401\n# Description: Authentication error.\n# Content-Type: application/json\n# 404\n# Description: Not found.\n\nError types:\n- \u0060not_found\u0060: The project could not be resolved while collecting its usage. Retry, and contact support if it persists.\n\n# Content-Type: application/json\n# 429\n# Description: Rate / capacity limit exceeded.\n\nError types:\n- \u0060limit_exceeded\u0060: The caller hit a per-minute request rate or other capacity limit. The \u0060message\u0060 describes which limit was hit.\n\n# Content-Type: application/json\n# 500\n# Description: Internal server error.\n# Content-Type: application/json",
+ "Format": "http",
+ "OperationId": "get_usage_summary",
+ "Setup": null
}
]
}
\ No newline at end of file
diff --git a/src/libs/Soniox/openapi.yaml b/src/libs/Soniox/openapi.yaml
index 656856e..a141822 100644
--- a/src/libs/Soniox/openapi.yaml
+++ b/src/libs/Soniox/openapi.yaml
@@ -1956,6 +1956,274 @@ paths:
- Usage logs
security:
- PublicApiAuth: []
+ /v1/usage/summary:
+ get:
+ operationId: get_usage_summary
+ summary: Get usage summary
+ parameters:
+ - in: query
+ name: start_time
+ schema:
+ description: Start of the window (inclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-01T00:00:00Z`). Its UTC day is included.
+ title: Start Time
+ type: string
+ required: true
+ description: Start of the window (inclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-01T00:00:00Z`). Its UTC day is included.
+ - in: query
+ name: end_time
+ schema:
+ description: End of the window (exclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-03T00:00:00Z`) and strictly after `start_time`. Its UTC day is included unless it falls exactly on midnight.
+ title: End Time
+ type: string
+ required: true
+ description: End of the window (exclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-03T00:00:00Z`) and strictly after `start_time`. Its UTC day is included unless it falls exactly on midnight.
+ responses:
+ '200':
+ description: Daily cost and activity aggregates.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GetUsageSummaryResponse'
+ example:
+ total:
+ model: null
+ days:
+ - '2026-04-01'
+ - '2026-04-02'
+ total_cost_usd: '0.2567250000'
+ total_input_cost_usd: '0.0415500000'
+ total_output_cost_usd: '0.2151750000'
+ total_duration_cost_usd: '0.0000000000'
+ cost_usd:
+ - '0.1711500000'
+ - '0.0855750000'
+ input_cost_usd:
+ - '0.0277000000'
+ - '0.0138500000'
+ output_cost_usd:
+ - '0.1434500000'
+ - '0.0717250000'
+ duration_cost_usd:
+ - '0.0000000000'
+ - '0.0000000000'
+ total_num_requests: 285
+ total_input_text_tokens: 4800
+ total_input_audio_tokens: 15000
+ total_input_audio_duration_ms: 1800000
+ total_output_text_tokens: 10800
+ total_output_audio_tokens: 8250
+ total_output_audio_duration_ms: 990000
+ total_duration_ms: 0
+ num_requests:
+ - 190
+ - 95
+ input_text_tokens:
+ - 3200
+ - 1600
+ input_audio_tokens:
+ - 10000
+ - 5000
+ input_audio_duration_ms:
+ - 1200000
+ - 600000
+ output_text_tokens:
+ - 7200
+ - 3600
+ output_audio_tokens:
+ - 5500
+ - 2750
+ output_audio_duration_ms:
+ - 660000
+ - 330000
+ duration_ms:
+ - 0
+ - 0
+ models:
+ - model: stt-async-v5
+ days:
+ - '2026-04-01'
+ - '2026-04-02'
+ total_cost_usd: '0.0613500000'
+ total_input_cost_usd: '0.0235500000'
+ total_output_cost_usd: '0.0378000000'
+ total_duration_cost_usd: '0.0000000000'
+ cost_usd:
+ - '0.0409000000'
+ - '0.0204500000'
+ input_cost_usd:
+ - '0.0157000000'
+ - '0.0078500000'
+ output_cost_usd:
+ - '0.0252000000'
+ - '0.0126000000'
+ duration_cost_usd:
+ - '0.0000000000'
+ - '0.0000000000'
+ total_num_requests: 60
+ total_input_text_tokens: 300
+ total_input_audio_tokens: 15000
+ total_input_audio_duration_ms: 1800000
+ total_output_text_tokens: 10800
+ total_output_audio_tokens: 0
+ total_output_audio_duration_ms: 0
+ total_duration_ms: 0
+ num_requests:
+ - 40
+ - 20
+ input_text_tokens:
+ - 200
+ - 100
+ input_audio_tokens:
+ - 10000
+ - 5000
+ input_audio_duration_ms:
+ - 1200000
+ - 600000
+ output_text_tokens:
+ - 7200
+ - 3600
+ output_audio_tokens:
+ - 0
+ - 0
+ output_audio_duration_ms:
+ - 0
+ - 0
+ duration_ms:
+ - 0
+ - 0
+ - model: tts-rt-v1
+ days:
+ - '2026-04-01'
+ - '2026-04-02'
+ total_cost_usd: '0.1953750000'
+ total_input_cost_usd: '0.0180000000'
+ total_output_cost_usd: '0.1773750000'
+ total_duration_cost_usd: '0.0000000000'
+ cost_usd:
+ - '0.1302500000'
+ - '0.0651250000'
+ input_cost_usd:
+ - '0.0120000000'
+ - '0.0060000000'
+ output_cost_usd:
+ - '0.1182500000'
+ - '0.0591250000'
+ duration_cost_usd:
+ - '0.0000000000'
+ - '0.0000000000'
+ total_num_requests: 225
+ total_input_text_tokens: 4500
+ total_input_audio_tokens: 0
+ total_input_audio_duration_ms: 0
+ total_output_text_tokens: 0
+ total_output_audio_tokens: 8250
+ total_output_audio_duration_ms: 990000
+ total_duration_ms: 0
+ num_requests:
+ - 150
+ - 75
+ input_text_tokens:
+ - 3000
+ - 1500
+ input_audio_tokens:
+ - 0
+ - 0
+ input_audio_duration_ms:
+ - 0
+ - 0
+ output_text_tokens:
+ - 0
+ - 0
+ output_audio_tokens:
+ - 5500
+ - 2750
+ output_audio_duration_ms:
+ - 660000
+ - 330000
+ duration_ms:
+ - 0
+ - 0
+ '400':
+ description: |
+ Invalid request.
+
+ Error types:
+ - `invalid_request`: A query parameter is missing or invalid. Common causes: `start_time` / `end_time` not parseable as ISO 8601, `end_time` not strictly after `start_time`, or the window covers more than 366 UTC days.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiError'
+ example:
+ status_code: 400
+ error_type: invalid_request
+ message: Your request did not pass validation. One or more fields in the request body are missing or have invalid values. See `validation_errors` for the specific field and retry with corrected values.
+ validation_errors:
+ - error_type: value_error
+ location: query.payload
+ message: The window covers 517 UTC days, which exceeds the maximum of 366.
+ request_id: 3d37a3bd-5078-47ee-a369-b204e3bbedda
+ more_info: https://soniox.com/docs/api-reference/errors#invalid-request
+ '401':
+ description: Authentication error.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiError'
+ example:
+ status_code: 401
+ error_type: unauthenticated
+ message: Incorrect API key provided. You can get an API key at https://console.soniox.com
+ validation_errors: []
+ request_id: 3d37a3bd-5078-47ee-a369-b204e3bbedda
+ more_info: https://soniox.com/docs/api-reference/errors#unauthenticated
+ '404':
+ description: |
+ Not found.
+
+ Error types:
+ - `not_found`: The project could not be resolved while collecting its usage. Retry, and contact support if it persists.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiError'
+ '429':
+ description: |
+ Rate / capacity limit exceeded.
+
+ Error types:
+ - `limit_exceeded`: The caller hit a per-minute request rate or other capacity limit. The `message` describes which limit was hit.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiError'
+ example:
+ status_code: 429
+ error_type: limit_exceeded
+ message: Requests per minute limit has been exceeded for your organization.
+ validation_errors: []
+ request_id: 3d37a3bd-5078-47ee-a369-b204e3bbedda
+ more_info: https://soniox.com/docs/api-reference/errors#limit-exceeded
+ '500':
+ description: Internal server error.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiError'
+ example:
+ status_code: 500
+ error_type: internal_error
+ message: The server encountered an error. Please try again. If the issue persists contact support@soniox.com.
+ validation_errors: []
+ request_id: 3d37a3bd-5078-47ee-a369-b204e3bbedda
+ more_info: https://soniox.com/docs/api-reference/errors#internal-error
+ description: |
+ Returns daily cost and activity for the project, broken down per model and summed across all models. The project is implied by the API key used for authentication.
+
+ Usage is aggregated by whole UTC day. The window is half-open, `[start_time, end_time)`, and a day is included when the window covers any part of it, so an `end_time` exactly at midnight excludes that day. The window must not cover more than 366 UTC days.
+ tags:
+ - Usage summary
+ security:
+ - PublicApiAuth: []
/v1/concurrency-limits:
get:
operationId: get_concurrency_limits
@@ -2036,6 +2304,146 @@ paths:
- Concurrency Limits
security:
- PublicApiAuth: []
+ /v1/concurrent-streams-history:
+ get:
+ operationId: get_concurrent_streams_history
+ summary: Get concurrent streams history
+ parameters:
+ - in: query
+ name: start_time
+ schema:
+ description: Start of the time window (inclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-28T09:00:00Z`). Filters by `period_start`.
+ title: Start Time
+ type: string
+ required: true
+ description: Start of the time window (inclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-28T09:00:00Z`). Filters by `period_start`.
+ - in: query
+ name: end_time
+ schema:
+ description: End of the time window (exclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-28T09:00:00Z`) and strictly after `start_time`. Filters by `period_start`.
+ title: End Time
+ type: string
+ required: true
+ description: End of the time window (exclusive). Must be an ISO 8601 timestamp in UTC (e.g. `2026-04-28T09:00:00Z`) and strictly after `start_time`. Filters by `period_start`.
+ - in: query
+ name: period_sec
+ schema:
+ description: Aggregation period in seconds. One of `60` (per-minute), `3600` (hourly), `86400` (daily). The period also caps how long the requested window may be.
+ enum:
+ - 60
+ - 3600
+ - 86400
+ title: Period Sec
+ type: integer
+ required: true
+ description: Aggregation period in seconds. One of `60` (per-minute), `3600` (hourly), `86400` (daily). The period also caps how long the requested window may be.
+ - in: query
+ name: kind
+ schema:
+ allOf:
+ - enum:
+ - stt
+ - tts
+ title: ConcurrentStreamKind
+ type: string
+ description: Stream kind to return. `stt` covers Speech-to-Text WebSocket sessions, `tts` covers Text-to-Speech WebSocket streams and REST requests.
+ required: true
+ description: Stream kind to return. `stt` covers Speech-to-Text WebSocket sessions, `tts` covers Text-to-Speech WebSocket streams and REST requests.
+ responses:
+ '200':
+ description: Per-period concurrent stream aggregates.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GetConcurrentStreamsHistoryResponse'
+ example:
+ kind: tts
+ entries:
+ - period_start: '2026-04-28T09:00:00Z'
+ period_sec: 60
+ sample_min: 0
+ sample_max: 4
+ sample_sum: 21
+ sample_count: 9
+ total_count: 1
+ - period_start: '2026-04-28T09:01:00Z'
+ period_sec: 60
+ sample_min: 0
+ sample_max: 0
+ sample_sum: 0
+ sample_count: 0
+ total_count: 0
+ '400':
+ description: |
+ Invalid request.
+
+ Error types:
+ - `invalid_request`: A query parameter is missing or invalid. Common causes: `period_sec` is not one of `60`, `3600`, `86400`, `start_time` / `end_time` not parseable as ISO 8601, `end_time` not strictly after `start_time`, the window between them exceeds the maximum for the requested `period_sec`, or the window would return more than 20000 entries.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiError'
+ example:
+ status_code: 400
+ error_type: invalid_request
+ message: Your request did not pass validation. One or more fields in the request body are missing or have invalid values. See `validation_errors` for the specific field and retry with corrected values.
+ validation_errors:
+ - error_type: value_error
+ location: query.payload
+ message: For period_sec=60, the window between `start_time` and `end_time` must not exceed 7 days.
+ request_id: 3d37a3bd-5078-47ee-a369-b204e3bbedda
+ more_info: https://soniox.com/docs/api-reference/errors#invalid-request
+ '401':
+ description: Authentication error.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiError'
+ example:
+ status_code: 401
+ error_type: unauthenticated
+ message: Incorrect API key provided. You can get an API key at https://console.soniox.com
+ validation_errors: []
+ request_id: 3d37a3bd-5078-47ee-a369-b204e3bbedda
+ more_info: https://soniox.com/docs/api-reference/errors#unauthenticated
+ '429':
+ description: |
+ Rate / capacity limit exceeded.
+
+ Error types:
+ - `limit_exceeded`: The caller hit a per-minute request rate or other capacity limit. The `message` describes which limit was hit.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiError'
+ example:
+ status_code: 429
+ error_type: limit_exceeded
+ message: Requests per minute limit has been exceeded for your organization.
+ validation_errors: []
+ request_id: 3d37a3bd-5078-47ee-a369-b204e3bbedda
+ more_info: https://soniox.com/docs/api-reference/errors#limit-exceeded
+ '500':
+ description: Internal server error.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiError'
+ example:
+ status_code: 500
+ error_type: internal_error
+ message: The server encountered an error. Please try again. If the issue persists contact support@soniox.com.
+ validation_errors: []
+ request_id: 3d37a3bd-5078-47ee-a369-b204e3bbedda
+ more_info: https://soniox.com/docs/api-reference/errors#internal-error
+ description: |
+ Returns historical concurrent stream counts for the project, aggregated per period. The project is implied by the API key used for authentication. Region-scoped.
+
+ Every aggregation period in the requested window is returned, with no gaps. Periods with no recorded activity have every field set to `0`.
+ tags:
+ - Concurrent streams history
+ security:
+ - PublicApiAuth: []
components:
schemas:
Voice:
@@ -3742,6 +4150,10 @@ components:
description: Maximum supported speaking rate.
title: Speed Max
type: number
+ supports_silence_reduction:
+ description: Whether the model supports shortening the pauses between words via the `reduce_silence` parameter.
+ title: Supports Silence Reduction
+ type: boolean
required:
- id
- aliased_model_id
@@ -3751,6 +4163,7 @@ components:
- supports_speed_adjustment
- speed_min
- speed_max
+ - supports_silence_reduction
title: TTSModel
type: object
TTSVoice:
@@ -3790,6 +4203,7 @@ components:
bitrate: 128000
client_reference_id: some_internal_id
speed: 1.2
+ reduce_silence: true
properties:
model:
default: tts-rt-v1
@@ -3838,6 +4252,12 @@ components:
- type: 'null'
description: Optional speaking rate of the generated speech, from `0.7` to `1.3`. `1.0` is the normal speed; lower values slow speech down and higher values speed it up. Defaults to `1.0`.
title: Speed
+ reduce_silence:
+ anyOf:
+ - type: boolean
+ - type: 'null'
+ description: Optional. When `true`, shortens the pauses between words so the generated speech flows more naturally. Defaults to `false`. Only supported on models with `supports_silence_reduction` set to `true`; enabling it on any other model returns an `invalid_request` error.
+ title: Reduce Silence
required:
- model
- language
@@ -4061,47 +4481,26 @@ components:
title: Output Audio Duration Ms
type: integer
cost_usd:
- anyOf:
- - type: number
- - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
- type: string
title: Cost Usd
+ type: string
input_cost_usd:
- anyOf:
- - type: number
- - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
- type: string
title: Input Cost Usd
+ type: string
input_text_cost_usd:
- anyOf:
- - type: number
- - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
- type: string
title: Input Text Cost Usd
+ type: string
input_audio_cost_usd:
- anyOf:
- - type: number
- - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
- type: string
title: Input Audio Cost Usd
+ type: string
output_cost_usd:
- anyOf:
- - type: number
- - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
- type: string
title: Output Cost Usd
+ type: string
output_text_cost_usd:
- anyOf:
- - type: number
- - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
- type: string
title: Output Text Cost Usd
+ type: string
output_audio_cost_usd:
- anyOf:
- - type: number
- - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
- type: string
title: Output Audio Cost Usd
+ type: string
required:
- uuid
- request_scope
@@ -4124,6 +4523,174 @@ components:
- output_audio_cost_usd
title: UsageLogEntry
type: object
+ GetUsageSummaryResponse:
+ properties:
+ total:
+ allOf:
+ - $ref: '#/components/schemas/UsageSummaryEntry'
+ description: Cost and activity across all models. Its `model` is `null`.
+ models:
+ description: One entry per model that recorded usage in the window. Empty when the project had no usage.
+ items:
+ $ref: '#/components/schemas/UsageSummaryEntry'
+ title: Models
+ type: array
+ required:
+ - total
+ - models
+ title: GetUsageSummaryResponse
+ type: object
+ UsageSummaryEntry:
+ properties:
+ model:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: Model identifier. `null` on the `total` entry.
+ title: Model
+ days:
+ description: One UTC day (`YYYY-MM-DD`) per element, in ascending order. Every day in the requested window is present, including days with no usage. All the per-day arrays below align to this axis.
+ items:
+ format: date
+ type: string
+ title: Days
+ type: array
+ total_cost_usd:
+ description: Total cost over the window, in USD. Equals `total_input_cost_usd` + `total_output_cost_usd` + `total_duration_cost_usd`.
+ title: Total Cost Usd
+ type: string
+ total_input_cost_usd:
+ description: Total cost of input tokens over the window, in USD.
+ title: Total Input Cost Usd
+ type: string
+ total_output_cost_usd:
+ description: Total cost of output tokens over the window, in USD.
+ title: Total Output Cost Usd
+ type: string
+ total_duration_cost_usd:
+ description: Total cost over the window for models billed by session duration rather than by tokens, in USD. `0` for Speech-to-Text and Text-to-Speech models.
+ title: Total Duration Cost Usd
+ type: string
+ cost_usd:
+ description: Cost per day, in USD, aligned to `days`.
+ items:
+ type: string
+ title: Cost Usd
+ type: array
+ input_cost_usd:
+ description: Cost of input tokens per day, in USD, aligned to `days`.
+ items:
+ type: string
+ title: Input Cost Usd
+ type: array
+ output_cost_usd:
+ description: Cost of output tokens per day, in USD, aligned to `days`.
+ items:
+ type: string
+ title: Output Cost Usd
+ type: array
+ duration_cost_usd:
+ description: Duration-billed cost per day, in USD, aligned to `days`.
+ items:
+ type: string
+ title: Duration Cost Usd
+ type: array
+ total_num_requests:
+ description: Number of requests over the window.
+ title: Total Num Requests
+ type: integer
+ total_input_text_tokens:
+ title: Total Input Text Tokens
+ type: integer
+ total_input_audio_tokens:
+ title: Total Input Audio Tokens
+ type: integer
+ total_input_audio_duration_ms:
+ title: Total Input Audio Duration Ms
+ type: integer
+ total_output_text_tokens:
+ title: Total Output Text Tokens
+ type: integer
+ total_output_audio_tokens:
+ title: Total Output Audio Tokens
+ type: integer
+ total_output_audio_duration_ms:
+ title: Total Output Audio Duration Ms
+ type: integer
+ total_duration_ms:
+ description: Billed session duration over the window, in milliseconds, for models billed by duration. `0` for Speech-to-Text and Text-to-Speech models.
+ title: Total Duration Ms
+ type: integer
+ num_requests:
+ description: Number of requests per day, aligned to `days`.
+ items:
+ type: integer
+ title: Num Requests
+ type: array
+ input_text_tokens:
+ items:
+ type: integer
+ title: Input Text Tokens
+ type: array
+ input_audio_tokens:
+ items:
+ type: integer
+ title: Input Audio Tokens
+ type: array
+ input_audio_duration_ms:
+ items:
+ type: integer
+ title: Input Audio Duration Ms
+ type: array
+ output_text_tokens:
+ items:
+ type: integer
+ title: Output Text Tokens
+ type: array
+ output_audio_tokens:
+ items:
+ type: integer
+ title: Output Audio Tokens
+ type: array
+ output_audio_duration_ms:
+ items:
+ type: integer
+ title: Output Audio Duration Ms
+ type: array
+ duration_ms:
+ description: Billed session duration per day, in milliseconds, aligned to `days`.
+ items:
+ type: integer
+ title: Duration Ms
+ type: array
+ required:
+ - days
+ - total_cost_usd
+ - total_input_cost_usd
+ - total_output_cost_usd
+ - total_duration_cost_usd
+ - cost_usd
+ - input_cost_usd
+ - output_cost_usd
+ - duration_cost_usd
+ - total_num_requests
+ - total_input_text_tokens
+ - total_input_audio_tokens
+ - total_input_audio_duration_ms
+ - total_output_text_tokens
+ - total_output_audio_tokens
+ - total_output_audio_duration_ms
+ - total_duration_ms
+ - num_requests
+ - input_text_tokens
+ - input_audio_tokens
+ - input_audio_duration_ms
+ - output_text_tokens
+ - output_audio_tokens
+ - output_audio_duration_ms
+ - duration_ms
+ title: UsageSummaryEntry
+ type: object
GetConcurrencyLimitsResponse:
properties:
project:
@@ -4178,6 +4745,70 @@ components:
- tts_concurrent
title: LimitValues
type: object
+ GetConcurrentStreamsHistoryResponse:
+ properties:
+ kind:
+ allOf:
+ - $ref: '#/components/schemas/ConcurrentStreamKind'
+ description: Stream kind these entries describe (`stt` or `tts`).
+ entries:
+ description: Per-period concurrent stream aggregates for the authenticated project, ordered by `period_start` ascending. Every aggregation period in the requested window is returned, with no gaps. Periods with no recorded activity have every field set to `0`.
+ items:
+ $ref: '#/components/schemas/ConcurrentStreamsHistoryEntry'
+ title: Entries
+ type: array
+ required:
+ - kind
+ - entries
+ title: GetConcurrentStreamsHistoryResponse
+ type: object
+ ConcurrentStreamsHistoryEntry:
+ properties:
+ period_start:
+ description: Start of the aggregation period, UTC. Aligned to a multiple of `period_sec`.
+ format: date-time
+ title: Period Start
+ type: string
+ period_sec:
+ description: Aggregation period in seconds.
+ title: Period Sec
+ type: integer
+ sample_min:
+ description: Lowest recorded concurrent stream count in the period. Always `0`, because that is what the per-minute tier records. Use `sample_max` for the peak.
+ title: Sample Min
+ type: integer
+ sample_max:
+ description: Peak concurrent stream count in the period. Stays exact when periods are rolled up into hours and days. `0` when the period had no activity.
+ title: Sample Max
+ type: integer
+ sample_sum:
+ description: Sum of the recorded concurrency values in the period. Divide by `sample_count` for the average concurrency while streams were active, or by `total_count` for the average across the whole period with idle slots counted as zero.
+ title: Sample Sum
+ type: integer
+ sample_count:
+ description: Number of values actually recorded in the period. For `period_sec=60` this is how many samples were taken during that minute, so it is usually larger than `total_count`. For hourly and daily periods it is the number of source periods that had data, at most `total_count`. `0` when the period had no activity.
+ title: Sample Count
+ type: integer
+ total_count:
+ description: Number of slots the period covers. `1` for `period_sec=60`, `60` for `3600` (minutes per hour), `24` for `86400` (hours per day). `0` when the period had no activity.
+ title: Total Count
+ type: integer
+ required:
+ - period_start
+ - period_sec
+ - sample_min
+ - sample_max
+ - sample_sum
+ - sample_count
+ - total_count
+ title: ConcurrentStreamsHistoryEntry
+ type: object
+ ConcurrentStreamKind:
+ enum:
+ - stt
+ - tts
+ title: ConcurrentStreamKind
+ type: string
securitySchemes:
PublicApiAuth:
type: http