From 93d12234ff81e42aef5314db6fa7b898ae11dc82 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 28 Sep 2026 21:03:20 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...lestAI.Electron.JsonSerializerContext.g.cs | 4 +- ....ITextToSpeechClient.SynthesizeSpeech.g.cs | 14 ++ ...extToSpeechClient.SynthesizeSpeechSse.g.cs | 14 ++ ...verters.TtsRequestContentFilterAction.g.cs | 53 +++++ ...TtsRequestContentFilterActionNullable.g.cs | 60 ++++++ .../SmallestAI.JsonSerializerContext.g.cs | 8 +- ...SmallestAI.JsonSerializerContextTypes.g.cs | 196 +++++++++--------- .../SmallestAI.Models.TtsRequest.g.cs | 31 +++ ...I.Models.TtsRequestContentFilter.Json.g.cs | 141 +++++++++++++ ...lestAI.Models.TtsRequestContentFilter.g.cs | 72 +++++++ ....Models.TtsRequestContentFilterAction.g.cs | 52 +++++ ...AI.SpeechToText.JsonSerializerContext.g.cs | 4 +- ...AI.TextToSpeech.JsonSerializerContext.g.cs | 21 +- ...I.TextToSpeechClient.SynthesizeSpeech.g.cs | 15 ++ ...extToSpeechClient.SynthesizeSpeechSse.g.cs | 15 ++ src/libs/SmallestAI/openapi.yaml | 31 +++ 16 files changed, 630 insertions(+), 101 deletions(-) create mode 100644 src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestContentFilterAction.g.cs create mode 100644 src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestContentFilterActionNullable.g.cs create mode 100644 src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestContentFilter.Json.g.cs create mode 100644 src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestContentFilter.g.cs create mode 100644 src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestContentFilterAction.g.cs diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Electron.JsonSerializerContext.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Electron.JsonSerializerContext.g.cs index ca2a576..1b85315 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.Electron.JsonSerializerContext.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.Electron.JsonSerializerContext.g.cs @@ -16,8 +16,8 @@ namespace SmallestAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.ElectronToolCallType), TypeInfoPropertyName = "ElectronToolCallType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.ElectronToolCallFunction))] @@ -49,8 +49,8 @@ namespace SmallestAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.Error))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.ElectronToolCallType?), TypeInfoPropertyName = "NullableElectronToolCallType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.ChatCompletionRequestToolChoice0?), TypeInfoPropertyName = "NullableChatCompletionRequestToolChoice02")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.ChatCompletionRequestToolChoiceOneOf1Type?), TypeInfoPropertyName = "NullableChatCompletionRequestToolChoiceOneOf1Type2")] diff --git a/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeech.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeech.g.cs index 53280b8..2bad83c 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeech.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeech.g.cs @@ -488,6 +488,19 @@ public partial interface ITextToSpeechClient /// localizations.
/// Default Value: false /// + /// + /// Opt-in profanity filter for the submitted text. Off by default;
+ /// passing this object is the only way to turn it on. The filter
+ /// never rewrites your text — it either lets the request through or
+ /// rejects it before synthesis.
+ /// `action: "reject"` returns HTTP 400 with `error_code:
+ /// "CONTENT_FILTER_BLOCKED"`, the `language` checked and a
+ /// `match_count`; the matched terms are never returned or logged.
+ /// `action: "flag"` synthesizes normally and records the match.
+ /// Matching is whole-word, not substring. If no verdict is returned
+ /// the request fails open and the audio is synthesized unfiltered.
+ /// See [Content filter](/models/documentation/text-to-speech-lightning/content-filter). + /// /// /// Format of the returned audio. `pcm` is the lowest-latency option
/// but requires a decoder to play; `mp3` and `wav` are directly
@@ -523,6 +536,7 @@ public partial interface ITextToSpeechClient global::SmallestAI.TtsRequestLanguage? language = default, global::SmallestAI.TtsRequestNumberPronunciationLanguage? numberPronunciationLanguage = default, bool? mathNotation = default, + global::SmallestAI.TtsRequestContentFilter? contentFilter = default, global::SmallestAI.TtsRequestOutputFormat? outputFormat = default, global::System.Collections.Generic.IList? pronunciationDicts = default, bool? wordTimestamps = default, diff --git a/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeechSse.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeechSse.g.cs index b3a253b..c463307 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeechSse.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeechSse.g.cs @@ -191,6 +191,19 @@ public partial interface ITextToSpeechClient /// localizations.
/// Default Value: false /// + /// + /// Opt-in profanity filter for the submitted text. Off by default;
+ /// passing this object is the only way to turn it on. The filter
+ /// never rewrites your text — it either lets the request through or
+ /// rejects it before synthesis.
+ /// `action: "reject"` returns HTTP 400 with `error_code:
+ /// "CONTENT_FILTER_BLOCKED"`, the `language` checked and a
+ /// `match_count`; the matched terms are never returned or logged.
+ /// `action: "flag"` synthesizes normally and records the match.
+ /// Matching is whole-word, not substring. If no verdict is returned
+ /// the request fails open and the audio is synthesized unfiltered.
+ /// See [Content filter](/models/documentation/text-to-speech-lightning/content-filter). + /// /// /// Format of the returned audio. `pcm` is the lowest-latency option
/// but requires a decoder to play; `mp3` and `wav` are directly
@@ -225,6 +238,7 @@ public partial interface ITextToSpeechClient global::SmallestAI.TtsRequestLanguage? language = default, global::SmallestAI.TtsRequestNumberPronunciationLanguage? numberPronunciationLanguage = default, bool? mathNotation = default, + global::SmallestAI.TtsRequestContentFilter? contentFilter = default, global::SmallestAI.TtsRequestOutputFormat? outputFormat = default, global::System.Collections.Generic.IList? pronunciationDicts = default, bool? wordTimestamps = default, diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestContentFilterAction.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestContentFilterAction.g.cs new file mode 100644 index 0000000..288d4f0 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestContentFilterAction.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class TtsRequestContentFilterActionJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.TtsRequestContentFilterAction 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::SmallestAI.TtsRequestContentFilterActionExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.TtsRequestContentFilterAction)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.TtsRequestContentFilterAction); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.TtsRequestContentFilterAction value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::SmallestAI.TtsRequestContentFilterActionExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestContentFilterActionNullable.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestContentFilterActionNullable.g.cs new file mode 100644 index 0000000..423f037 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestContentFilterActionNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class TtsRequestContentFilterActionNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.TtsRequestContentFilterAction? 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::SmallestAI.TtsRequestContentFilterActionExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.TtsRequestContentFilterAction)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.TtsRequestContentFilterAction?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.TtsRequestContentFilterAction? 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::SmallestAI.TtsRequestContentFilterActionExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContext.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContext.g.cs index c46741e..3aeac9b 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContext.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContext.g.cs @@ -43,6 +43,10 @@ namespace SmallestAI typeof(global::SmallestAI.JsonConverters.TtsRequestNumberPronunciationLanguageNullableJsonConverter), + typeof(global::SmallestAI.JsonConverters.TtsRequestContentFilterActionJsonConverter), + + typeof(global::SmallestAI.JsonConverters.TtsRequestContentFilterActionNullableJsonConverter), + typeof(global::SmallestAI.JsonConverters.TtsRequestOutputFormatJsonConverter), typeof(global::SmallestAI.JsonConverters.TtsRequestOutputFormatNullableJsonConverter), @@ -164,10 +168,12 @@ namespace SmallestAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestSampleRate), TypeInfoPropertyName = "TtsRequestSampleRate2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestLanguage), TypeInfoPropertyName = "TtsRequestLanguage2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestNumberPronunciationLanguage), TypeInfoPropertyName = "TtsRequestNumberPronunciationLanguage2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestContentFilterAction), TypeInfoPropertyName = "TtsRequestContentFilterAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestContentFilter))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestOutputFormat), TypeInfoPropertyName = "TtsRequestOutputFormat2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsError))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1TtsLivePostParametersXExpireContent), TypeInfoPropertyName = "WavesV1TtsLivePostParametersXExpireContent2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1ModelGetVoicesGetParametersModel), TypeInfoPropertyName = "WavesV1ModelGetVoicesGetParametersModel2")] diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContextTypes.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContextTypes.g.cs index b432f24..075aa4a 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContextTypes.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContextTypes.g.cs @@ -105,379 +105,387 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::SmallestAI.TtsRequestOutputFormat? Type18 { get; set; } + public global::SmallestAI.TtsRequestContentFilterAction? Type18 { get; set; } /// /// /// - public global::SmallestAI.TtsRequest? Type19 { get; set; } + public global::SmallestAI.TtsRequestContentFilter? Type19 { get; set; } /// /// /// - public double? Type20 { get; set; } + public bool? Type20 { get; set; } /// /// /// - public bool? Type21 { get; set; } + public global::SmallestAI.TtsRequestOutputFormat? Type21 { get; set; } /// /// /// - public global::SmallestAI.TtsError? Type22 { get; set; } + public global::SmallestAI.TtsRequest? Type22 { get; set; } /// /// /// - public global::SmallestAI.WavesV1TtsLivePostParametersXExpireContent? Type23 { get; set; } + public double? Type23 { get; set; } /// /// /// - public global::SmallestAI.WavesV1ModelGetVoicesGetParametersModel? Type24 { get; set; } + public global::SmallestAI.TtsError? Type24 { get; set; } /// /// /// - public global::SmallestAI.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags? Type25 { get; set; } + public global::SmallestAI.WavesV1TtsLivePostParametersXExpireContent? Type25 { get; set; } /// /// /// - public global::SmallestAI.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems? Type26 { get; set; } + public global::SmallestAI.WavesV1ModelGetVoicesGetParametersModel? Type26 { get; set; } /// /// /// - public global::SmallestAI.VoicesGetWavesVoicesResponse200? Type27 { get; set; } + public global::SmallestAI.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags? Type27 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type28 { get; set; } + public global::SmallestAI.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems? Type28 { get; set; } /// /// /// - public global::SmallestAI.GetWavesVoicesRequestBadRequestError? Type29 { get; set; } + public global::SmallestAI.VoicesGetWavesVoicesResponse200? Type29 { get; set; } /// /// /// - public global::SmallestAI.GetWavesVoicesRequestUnauthorizedError? Type30 { get; set; } + public global::System.Collections.Generic.IList? Type30 { get; set; } /// /// /// - public global::SmallestAI.GetWavesVoicesRequestInternalServerError? Type31 { get; set; } + public global::SmallestAI.GetWavesVoicesRequestBadRequestError? Type31 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaLanguage? Type32 { get; set; } + public global::SmallestAI.GetWavesVoicesRequestUnauthorizedError? Type32 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaModel? Type33 { get; set; } + public global::SmallestAI.GetWavesVoicesRequestInternalServerError? Type33 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataStatus? Type34 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaLanguage? Type34 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataSamplesItems? Type35 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaModel? Type35 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaData? Type36 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataStatus? Type36 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type37 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataSamplesItems? Type37 { get; set; } /// /// /// - public global::SmallestAI.VoiceCloningCreateVoiceCloneResponse200? Type38 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaData? Type38 { get; set; } /// /// /// - public global::SmallestAI.CreateVoiceCloneRequestBadRequestError? Type39 { get; set; } + public global::System.Collections.Generic.IList? Type39 { get; set; } /// /// /// - public global::SmallestAI.CreateVoiceCloneRequestUnauthorizedError? Type40 { get; set; } + public global::SmallestAI.VoiceCloningCreateVoiceCloneResponse200? Type40 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaErrorCode? Type41 { get; set; } + public global::SmallestAI.CreateVoiceCloneRequestBadRequestError? Type41 { get; set; } /// /// /// - public global::SmallestAI.CreateVoiceCloneRequestInternalServerError? Type42 { get; set; } + public global::SmallestAI.CreateVoiceCloneRequestUnauthorizedError? Type42 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsStatus? Type43 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaErrorCode? Type43 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsCloningType? Type44 { get; set; } + public global::SmallestAI.CreateVoiceCloneRequestInternalServerError? Type44 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItems? Type45 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsStatus? Type45 { get; set; } /// /// /// - public global::SmallestAI.VoiceCloningListVoiceClonesResponse200? Type46 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsCloningType? Type46 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type47 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItems? Type47 { get; set; } /// /// /// - public global::SmallestAI.PronunciationItem? Type48 { get; set; } + public global::SmallestAI.VoiceCloningListVoiceClonesResponse200? Type48 { get; set; } /// /// /// - public global::SmallestAI.PronunciationDict? Type49 { get; set; } + public global::System.Collections.Generic.IList? Type49 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type50 { get; set; } + public global::SmallestAI.PronunciationItem? Type50 { get; set; } /// /// /// - public global::SmallestAI.ErrorResponseDetailsItems? Type51 { get; set; } + public global::SmallestAI.PronunciationDict? Type51 { get; set; } /// /// /// - public global::SmallestAI.ErrorResponse? Type52 { get; set; } + public global::System.Collections.Generic.IList? Type52 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type53 { get; set; } + public global::SmallestAI.ErrorResponseDetailsItems? Type53 { get; set; } /// /// /// - public global::SmallestAI.CreatePronunciationDictRequest? Type54 { get; set; } + public global::SmallestAI.ErrorResponse? Type54 { get; set; } /// /// /// - public global::SmallestAI.UpdatePronunciationDictRequest? Type55 { get; set; } + public global::System.Collections.Generic.IList? Type55 { get; set; } /// /// /// - public global::SmallestAI.UpdatePronunciationDictResponse? Type56 { get; set; } + public global::SmallestAI.CreatePronunciationDictRequest? Type56 { get; set; } /// /// /// - public global::SmallestAI.DeletePronunciationDictRequest? Type57 { get; set; } + public global::SmallestAI.UpdatePronunciationDictRequest? Type57 { get; set; } /// /// /// - public global::SmallestAI.DeletePronunciationDictResponse? Type58 { get; set; } + public global::SmallestAI.UpdatePronunciationDictResponse? Type58 { get; set; } /// /// /// - public global::SmallestAI.WavesV1SttPostParametersModel? Type59 { get; set; } + public global::SmallestAI.DeletePronunciationDictRequest? Type59 { get; set; } /// /// /// - public global::SmallestAI.WavesV1SttPostParametersLanguage? Type60 { get; set; } + public global::SmallestAI.DeletePronunciationDictResponse? Type60 { get; set; } /// /// /// - public global::SmallestAI.WavesV1SttPostParametersWebhookMethod? Type61 { get; set; } + public global::SmallestAI.WavesV1SttPostParametersModel? Type61 { get; set; } /// /// /// - public global::SmallestAI.WavesV1SttPostParametersRedactPii? Type62 { get; set; } + public global::SmallestAI.WavesV1SttPostParametersLanguage? Type62 { get; set; } /// /// /// - public global::SmallestAI.WavesV1SttPostParametersRedactPci? Type63 { get; set; } + public global::SmallestAI.WavesV1SttPostParametersWebhookMethod? Type63 { get; set; } /// /// /// - public global::SmallestAI.WavesV1SttPostParametersEmotionDetection? Type64 { get; set; } + public global::SmallestAI.WavesV1SttPostParametersRedactPii? Type64 { get; set; } /// /// /// - public global::SmallestAI.WavesV1SttPostParametersGenderDetection? Type65 { get; set; } + public global::SmallestAI.WavesV1SttPostParametersRedactPci? Type65 { get; set; } /// /// /// - public global::SmallestAI.WavesV1SttPostParametersXExpireContent? Type66 { get; set; } + public global::SmallestAI.WavesV1SttPostParametersEmotionDetection? Type66 { get; set; } /// /// /// - public global::SmallestAI.Word? Type67 { get; set; } + public global::SmallestAI.WavesV1SttPostParametersGenderDetection? Type67 { get; set; } /// /// /// - public global::SmallestAI.Utterance? Type68 { get; set; } + public global::SmallestAI.WavesV1SttPostParametersXExpireContent? Type68 { get; set; } /// /// /// - public global::SmallestAI.TranscriptionResponseMetadata? Type69 { get; set; } + public global::SmallestAI.Word? Type69 { get; set; } /// /// /// - public global::SmallestAI.TranscriptionResponse? Type70 { get; set; } + public global::SmallestAI.Utterance? Type70 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type71 { get; set; } + public global::SmallestAI.TranscriptionResponseMetadata? Type71 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type72 { get; set; } + public global::SmallestAI.TranscriptionResponse? Type72 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type73 { get; set; } + public global::System.Collections.Generic.IList? Type73 { get; set; } /// /// /// - public global::SmallestAI.AsyncAccepted? Type74 { get; set; } + public global::System.Collections.Generic.IList? Type74 { get; set; } /// /// /// - public global::SmallestAI.SpeechToTextTranscribeResponse200? Type75 { get; set; } + public global::System.Collections.Generic.Dictionary? Type75 { get; set; } /// /// /// - public global::SmallestAI.SttErrorResponseDetailsItems? Type76 { get; set; } + public global::SmallestAI.AsyncAccepted? Type76 { get; set; } /// /// /// - public global::SmallestAI.SttErrorResponse? Type77 { get; set; } + public global::SmallestAI.SpeechToTextTranscribeResponse200? Type77 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type78 { get; set; } + public global::SmallestAI.SttErrorResponseDetailsItems? Type78 { get; set; } /// /// /// - public global::SmallestAI.ElectronToolCallType? Type79 { get; set; } + public global::SmallestAI.SttErrorResponse? Type79 { get; set; } /// /// /// - public global::SmallestAI.ElectronToolCallFunction? Type80 { get; set; } + public global::System.Collections.Generic.IList? Type80 { get; set; } /// /// /// - public global::SmallestAI.ElectronToolCall? Type81 { get; set; } + public global::SmallestAI.ElectronToolCallType? Type81 { get; set; } /// /// /// - public global::SmallestAI.ElectronMessage? Type82 { get; set; } + public global::SmallestAI.ElectronToolCallFunction? Type82 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type83 { get; set; } + public global::SmallestAI.ElectronToolCall? Type83 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestStreamOptions? Type84 { get; set; } + public global::SmallestAI.ElectronMessage? Type84 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestToolChoice0? Type85 { get; set; } + public global::System.Collections.Generic.IList? Type85 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestToolChoiceOneOf1Type? Type86 { get; set; } + public global::SmallestAI.ChatCompletionRequestStreamOptions? Type86 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestToolChoiceOneOf1Function? Type87 { get; set; } + public global::SmallestAI.ChatCompletionRequestToolChoice0? Type87 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestToolChoice1? Type88 { get; set; } + public global::SmallestAI.ChatCompletionRequestToolChoiceOneOf1Type? Type88 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestToolChoice? Type89 { get; set; } + public global::SmallestAI.ChatCompletionRequestToolChoiceOneOf1Function? Type89 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestResponseFormatType? Type90 { get; set; } + public global::SmallestAI.ChatCompletionRequestToolChoice1? Type90 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestResponseFormat? Type91 { get; set; } + public global::SmallestAI.ChatCompletionRequestToolChoice? Type91 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestStop? Type92 { get; set; } + public global::SmallestAI.ChatCompletionRequestResponseFormatType? Type92 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequest? Type93 { get; set; } + public global::SmallestAI.ChatCompletionRequestResponseFormat? Type93 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type94 { get; set; } + public global::SmallestAI.ChatCompletionRequestStop? Type94 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type95 { get; set; } + public global::SmallestAI.ChatCompletionRequest? Type95 { get; set; } /// /// /// - public object? Type96 { get; set; } + public global::System.Collections.Generic.IList? Type96 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionObject? Type97 { get; set; } + public global::System.Collections.Generic.IList? Type97 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionChoicesItemsFinishReason? Type98 { get; set; } + public object? Type98 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionChoicesItems? Type99 { get; set; } + public global::SmallestAI.ChatCompletionObject? Type99 { get; set; } /// /// /// - public global::SmallestAI.UsagePromptTokensDetails? Type100 { get; set; } + public global::SmallestAI.ChatCompletionChoicesItemsFinishReason? Type100 { get; set; } /// /// /// - public global::SmallestAI.Usage? Type101 { get; set; } + public global::SmallestAI.ChatCompletionChoicesItems? Type101 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletion? Type102 { get; set; } + public global::SmallestAI.UsagePromptTokensDetails? Type102 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type103 { get; set; } + public global::SmallestAI.Usage? Type103 { get; set; } /// /// /// - public global::SmallestAI.ErrorErrorDetailsItems? Type104 { get; set; } + public global::SmallestAI.ChatCompletion? Type104 { get; set; } /// /// /// - public global::SmallestAI.ErrorError? Type105 { get; set; } + public global::System.Collections.Generic.IList? Type105 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type106 { get; set; } + public global::SmallestAI.ErrorErrorDetailsItems? Type106 { get; set; } /// /// /// - public global::SmallestAI.Error? Type107 { get; set; } + public global::SmallestAI.ErrorError? Type107 { get; set; } /// /// /// - public global::SmallestAI.TranscriptionUrlRequest? Type108 { get; set; } + public global::System.Collections.Generic.IList? Type108 { get; set; } /// /// /// - public global::SmallestAI.CreateVoiceCloneRequest? Type109 { get; set; } + public global::SmallestAI.Error? Type109 { get; set; } /// /// /// - public byte[]? Type110 { get; set; } + public global::SmallestAI.TranscriptionUrlRequest? Type110 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type111 { get; set; } + public global::SmallestAI.CreateVoiceCloneRequest? Type111 { get; set; } + /// + /// + /// + public byte[]? Type112 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type113 { get; set; } /// /// diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequest.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequest.g.cs index d90d21d..aaef428 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequest.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequest.g.cs @@ -147,6 +147,22 @@ public sealed partial class TtsRequest [global::System.Text.Json.Serialization.JsonPropertyName("math_notation")] public bool? MathNotation { get; set; } + /// + /// Opt-in profanity filter for the submitted text. Off by default;
+ /// passing this object is the only way to turn it on. The filter
+ /// never rewrites your text — it either lets the request through or
+ /// rejects it before synthesis.
+ /// `action: "reject"` returns HTTP 400 with `error_code:
+ /// "CONTENT_FILTER_BLOCKED"`, the `language` checked and a
+ /// `match_count`; the matched terms are never returned or logged.
+ /// `action: "flag"` synthesizes normally and records the match.
+ /// Matching is whole-word, not substring. If no verdict is returned
+ /// the request fails open and the audio is synthesized unfiltered.
+ /// See [Content filter](/models/documentation/text-to-speech-lightning/content-filter). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("content_filter")] + public global::SmallestAI.TtsRequestContentFilter? ContentFilter { get; set; } + /// /// Format of the returned audio. `pcm` is the lowest-latency option
/// but requires a decoder to play; `mp3` and `wav` are directly
@@ -300,6 +316,19 @@ public sealed partial class TtsRequest /// localizations.
/// Default Value: false /// + /// + /// Opt-in profanity filter for the submitted text. Off by default;
+ /// passing this object is the only way to turn it on. The filter
+ /// never rewrites your text — it either lets the request through or
+ /// rejects it before synthesis.
+ /// `action: "reject"` returns HTTP 400 with `error_code:
+ /// "CONTENT_FILTER_BLOCKED"`, the `language` checked and a
+ /// `match_count`; the matched terms are never returned or logged.
+ /// `action: "flag"` synthesizes normally and records the match.
+ /// Matching is whole-word, not substring. If no verdict is returned
+ /// the request fails open and the audio is synthesized unfiltered.
+ /// See [Content filter](/models/documentation/text-to-speech-lightning/content-filter). + /// /// /// Format of the returned audio. `pcm` is the lowest-latency option
/// but requires a decoder to play; `mp3` and `wav` are directly
@@ -333,6 +362,7 @@ public TtsRequest( global::SmallestAI.TtsRequestLanguage? language, global::SmallestAI.TtsRequestNumberPronunciationLanguage? numberPronunciationLanguage, bool? mathNotation, + global::SmallestAI.TtsRequestContentFilter? contentFilter, global::SmallestAI.TtsRequestOutputFormat? outputFormat, global::System.Collections.Generic.IList? pronunciationDicts, bool? wordTimestamps, @@ -347,6 +377,7 @@ public TtsRequest( this.Language = language; this.NumberPronunciationLanguage = numberPronunciationLanguage; this.MathNotation = mathNotation; + this.ContentFilter = contentFilter; this.OutputFormat = outputFormat; this.PronunciationDicts = pronunciationDicts; this.WordTimestamps = wordTimestamps; diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestContentFilter.Json.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestContentFilter.Json.g.cs new file mode 100644 index 0000000..cdb11c5 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestContentFilter.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace SmallestAI +{ + public sealed partial class TtsRequestContentFilter + { + /// + /// 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::SmallestAI.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::SmallestAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::SmallestAI.TtsRequestContentFilter? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::SmallestAI.TtsRequestContentFilter), + jsonSerializerContext) as global::SmallestAI.TtsRequestContentFilter; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::SmallestAI.TtsRequestContentFilter? FromJson( + string json) + { + return FromJson( + json, + global::SmallestAI.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::SmallestAI.TtsRequestContentFilter? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::SmallestAI.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::SmallestAI.TtsRequestContentFilter), + jsonSerializerContext).ConfigureAwait(false)) as global::SmallestAI.TtsRequestContentFilter; + } + + /// + /// 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::SmallestAI.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::SmallestAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestContentFilter.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestContentFilter.g.cs new file mode 100644 index 0000000..270564a --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestContentFilter.g.cs @@ -0,0 +1,72 @@ + +#nullable enable + +namespace SmallestAI +{ + /// + /// Opt-in profanity filter for the submitted text. Off by default;
+ /// passing this object is the only way to turn it on. The filter
+ /// never rewrites your text — it either lets the request through or
+ /// rejects it before synthesis.
+ /// `action: "reject"` returns HTTP 400 with `error_code:
+ /// "CONTENT_FILTER_BLOCKED"`, the `language` checked and a
+ /// `match_count`; the matched terms are never returned or logged.
+ /// `action: "flag"` synthesizes normally and records the match.
+ /// Matching is whole-word, not substring. If no verdict is returned
+ /// the request fails open and the audio is synthesized unfiltered.
+ /// See [Content filter](/models/documentation/text-to-speech-lightning/content-filter). + ///
+ public sealed partial class TtsRequestContentFilter + { + /// + /// Must be the literal `true` to enable the filter. Any other value leaves it off.
+ /// Default Value: false + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("enabled")] + public bool? Enabled { get; set; } + + /// + /// What happens on a match. `reject` fails the request with HTTP 400; `flag` synthesizes normally and records the match.
+ /// Default Value: reject + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("action")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::SmallestAI.JsonConverters.TtsRequestContentFilterActionJsonConverter))] + public global::SmallestAI.TtsRequestContentFilterAction? Action { 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. + /// + /// + /// Must be the literal `true` to enable the filter. Any other value leaves it off.
+ /// Default Value: false + /// + /// + /// What happens on a match. `reject` fails the request with HTTP 400; `flag` synthesizes normally and records the match.
+ /// Default Value: reject + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TtsRequestContentFilter( + bool? enabled, + global::SmallestAI.TtsRequestContentFilterAction? action) + { + this.Enabled = enabled; + this.Action = action; + } + + /// + /// Initializes a new instance of the class. + /// + public TtsRequestContentFilter() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestContentFilterAction.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestContentFilterAction.g.cs new file mode 100644 index 0000000..c6534d2 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestContentFilterAction.g.cs @@ -0,0 +1,52 @@ + +#nullable enable + +namespace SmallestAI +{ + /// + /// What happens on a match. `reject` fails the request with HTTP 400; `flag` synthesizes normally and records the match.
+ /// Default Value: reject + ///
+ public enum TtsRequestContentFilterAction + { + /// + /// + /// + Flag, + /// + /// + /// + Reject, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TtsRequestContentFilterActionExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TtsRequestContentFilterAction value) + { + return value switch + { + TtsRequestContentFilterAction.Flag => "flag", + TtsRequestContentFilterAction.Reject => "reject", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TtsRequestContentFilterAction? ToEnum(string value) + { + return value switch + { + "flag" => TtsRequestContentFilterAction.Flag, + "reject" => TtsRequestContentFilterAction.Reject, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.SpeechToText.JsonSerializerContext.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.SpeechToText.JsonSerializerContext.g.cs index 448aea4..0f597d5 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.SpeechToText.JsonSerializerContext.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.SpeechToText.JsonSerializerContext.g.cs @@ -15,8 +15,8 @@ namespace SmallestAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersModel), TypeInfoPropertyName = "WavesV1SttPostParametersModel2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersLanguage), TypeInfoPropertyName = "WavesV1SttPostParametersLanguage2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersWebhookMethod), TypeInfoPropertyName = "WavesV1SttPostParametersWebhookMethod2")] @@ -40,8 +40,8 @@ namespace SmallestAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TranscriptionUrlRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersModel?), TypeInfoPropertyName = "NullableWavesV1SttPostParametersModel2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersLanguage?), TypeInfoPropertyName = "NullableWavesV1SttPostParametersLanguage2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersWebhookMethod?), TypeInfoPropertyName = "NullableWavesV1SttPostParametersWebhookMethod2")] diff --git a/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeech.JsonSerializerContext.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeech.JsonSerializerContext.g.cs index fa9d06e..92a913c 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeech.JsonSerializerContext.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeech.JsonSerializerContext.g.cs @@ -21,10 +21,12 @@ namespace SmallestAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestSampleRate), TypeInfoPropertyName = "TtsRequestSampleRate2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestLanguage), TypeInfoPropertyName = "TtsRequestLanguage2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestNumberPronunciationLanguage), TypeInfoPropertyName = "TtsRequestNumberPronunciationLanguage2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestContentFilterAction), TypeInfoPropertyName = "TtsRequestContentFilterAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestContentFilter))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestOutputFormat), TypeInfoPropertyName = "TtsRequestOutputFormat2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsError))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1TtsLivePostParametersXExpireContent), TypeInfoPropertyName = "WavesV1TtsLivePostParametersXExpireContent2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] @@ -34,9 +36,10 @@ namespace SmallestAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestSampleRate?), TypeInfoPropertyName = "NullableTtsRequestSampleRate2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestLanguage?), TypeInfoPropertyName = "NullableTtsRequestLanguage2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestNumberPronunciationLanguage?), TypeInfoPropertyName = "NullableTtsRequestNumberPronunciationLanguage2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestContentFilterAction?), TypeInfoPropertyName = "NullableTtsRequestContentFilterAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestOutputFormat?), TypeInfoPropertyName = "NullableTtsRequestOutputFormat2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1TtsLivePostParametersXExpireContent?), TypeInfoPropertyName = "NullableWavesV1TtsLivePostParametersXExpireContent2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] internal sealed partial class TextToSpeechSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext @@ -132,6 +135,10 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::SmallestAI.TtsRequestNumberPronunciationLanguage?) + || typeToConvert == typeof(global::SmallestAI.TtsRequestContentFilterAction) + + || typeToConvert == typeof(global::SmallestAI.TtsRequestContentFilterAction?) + || typeToConvert == typeof(global::SmallestAI.TtsRequestOutputFormat) || typeToConvert == typeof(global::SmallestAI.TtsRequestOutputFormat?) @@ -205,6 +212,16 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::SmallestAI.JsonConverters.TtsRequestNumberPronunciationLanguageNullableJsonConverter(); } + if (typeToConvert == typeof(global::SmallestAI.TtsRequestContentFilterAction)) + { + return new global::SmallestAI.JsonConverters.TtsRequestContentFilterActionJsonConverter(); + } + + if (typeToConvert == typeof(global::SmallestAI.TtsRequestContentFilterAction?)) + { + return new global::SmallestAI.JsonConverters.TtsRequestContentFilterActionNullableJsonConverter(); + } + if (typeToConvert == typeof(global::SmallestAI.TtsRequestOutputFormat)) { return new global::SmallestAI.JsonConverters.TtsRequestOutputFormatJsonConverter(); diff --git a/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeech.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeech.g.cs index abf1462..142a982 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeech.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeech.g.cs @@ -1444,6 +1444,19 @@ partial void ProcessSynthesizeSpeechResponseContent( /// localizations.
/// Default Value: false /// + /// + /// Opt-in profanity filter for the submitted text. Off by default;
+ /// passing this object is the only way to turn it on. The filter
+ /// never rewrites your text — it either lets the request through or
+ /// rejects it before synthesis.
+ /// `action: "reject"` returns HTTP 400 with `error_code:
+ /// "CONTENT_FILTER_BLOCKED"`, the `language` checked and a
+ /// `match_count`; the matched terms are never returned or logged.
+ /// `action: "flag"` synthesizes normally and records the match.
+ /// Matching is whole-word, not substring. If no verdict is returned
+ /// the request fails open and the audio is synthesized unfiltered.
+ /// See [Content filter](/models/documentation/text-to-speech-lightning/content-filter). + /// /// /// Format of the returned audio. `pcm` is the lowest-latency option
/// but requires a decoder to play; `mp3` and `wav` are directly
@@ -1479,6 +1492,7 @@ partial void ProcessSynthesizeSpeechResponseContent( global::SmallestAI.TtsRequestLanguage? language = default, global::SmallestAI.TtsRequestNumberPronunciationLanguage? numberPronunciationLanguage = default, bool? mathNotation = default, + global::SmallestAI.TtsRequestContentFilter? contentFilter = default, global::SmallestAI.TtsRequestOutputFormat? outputFormat = default, global::System.Collections.Generic.IList? pronunciationDicts = default, bool? wordTimestamps = default, @@ -1497,6 +1511,7 @@ partial void ProcessSynthesizeSpeechResponseContent( Language = language, NumberPronunciationLanguage = numberPronunciationLanguage, MathNotation = mathNotation, + ContentFilter = contentFilter, OutputFormat = outputFormat, PronunciationDicts = pronunciationDicts, WordTimestamps = wordTimestamps, diff --git a/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeechSse.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeechSse.g.cs index ec55e9f..19a8d10 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeechSse.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeechSse.g.cs @@ -560,6 +560,19 @@ partial void ProcessSynthesizeSpeechSseResponse( /// localizations.
/// Default Value: false /// + /// + /// Opt-in profanity filter for the submitted text. Off by default;
+ /// passing this object is the only way to turn it on. The filter
+ /// never rewrites your text — it either lets the request through or
+ /// rejects it before synthesis.
+ /// `action: "reject"` returns HTTP 400 with `error_code:
+ /// "CONTENT_FILTER_BLOCKED"`, the `language` checked and a
+ /// `match_count`; the matched terms are never returned or logged.
+ /// `action: "flag"` synthesizes normally and records the match.
+ /// Matching is whole-word, not substring. If no verdict is returned
+ /// the request fails open and the audio is synthesized unfiltered.
+ /// See [Content filter](/models/documentation/text-to-speech-lightning/content-filter). + /// /// /// Format of the returned audio. `pcm` is the lowest-latency option
/// but requires a decoder to play; `mp3` and `wav` are directly
@@ -594,6 +607,7 @@ partial void ProcessSynthesizeSpeechSseResponse( global::SmallestAI.TtsRequestLanguage? language = default, global::SmallestAI.TtsRequestNumberPronunciationLanguage? numberPronunciationLanguage = default, bool? mathNotation = default, + global::SmallestAI.TtsRequestContentFilter? contentFilter = default, global::SmallestAI.TtsRequestOutputFormat? outputFormat = default, global::System.Collections.Generic.IList? pronunciationDicts = default, bool? wordTimestamps = default, @@ -612,6 +626,7 @@ partial void ProcessSynthesizeSpeechSseResponse( Language = language, NumberPronunciationLanguage = numberPronunciationLanguage, MathNotation = mathNotation, + ContentFilter = contentFilter, OutputFormat = outputFormat, PronunciationDicts = pronunciationDicts, WordTimestamps = wordTimestamps, diff --git a/src/libs/SmallestAI/openapi.yaml b/src/libs/SmallestAI/openapi.yaml index a81fc14..be781a0 100644 --- a/src/libs/SmallestAI/openapi.yaml +++ b/src/libs/SmallestAI/openapi.yaml @@ -1283,6 +1283,33 @@ "description": "Optional. Sets the language used to read out numeric content —\nnumbers, currency amounts, times, and the numeric parts of dates\nand years — independently of the synthesis voice. Ordinary words\nare not translated.\n\n- If you **omit `language`**, this value also becomes the\n synthesis language: model selection and voice routing follow it.\n- If you **set `language` explicitly**, `language` always wins for\n synthesis and `number_pronunciation_language` only changes how\n numeric content is normalized. It works both ways — read numbers\n in Hindi under an English voice, or in English under a Hindi\n voice (tuned for Indian, often mixed-script, use cases).\n- Omit this field to keep the existing behaviour — normalization\n follows `language`.\n\nNote: only numeric tokens are re-spoken; the words around them\nstay in the text language. On a cross-language request names may\nalso render in the target script (e.g. \"Smith\" → \"स्मिथ\"), which\nis generally the desired reading for native-language voices.\n\nAccepts the same language codes as `language` (including `auto`,\n`nl`, `sv`).\n", "title": "TtsRequestNumberPronunciationLanguage" }, + "TtsRequestContentFilterAction": { + "type": "string", + "enum": [ + "reject", + "flag" + ], + "default": "reject", + "description": "What happens on a match. `reject` fails the request with HTTP 400; `flag` synthesizes normally and records the match.", + "title": "TtsRequestContentFilterAction" + }, + "TtsRequestContentFilter": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": false, + "description": "Must be the literal `true` to enable the filter. Any other value leaves it off." + }, + "action": { + "$ref": "#/components/schemas/TtsRequestContentFilterAction", + "default": "reject", + "description": "What happens on a match. `reject` fails the request with HTTP 400; `flag` synthesizes normally and records the match." + } + }, + "description": "Opt-in profanity filter for the submitted text. Off by default;\npassing this object is the only way to turn it on. The filter\nnever rewrites your text — it either lets the request through or\nrejects it before synthesis.\n\n`action: \"reject\"` returns HTTP 400 with `error_code:\n\"CONTENT_FILTER_BLOCKED\"`, the `language` checked and a\n`match_count`; the matched terms are never returned or logged.\n`action: \"flag\"` synthesizes normally and records the match.\n\nMatching is whole-word, not substring. If no verdict is returned\nthe request fails open and the audio is synthesized unfiltered.\n\nSee [Content filter](/models/documentation/text-to-speech-lightning/content-filter).\n", + "title": "TtsRequestContentFilter" + }, "TtsRequestOutputFormat": { "type": "string", "enum": [ @@ -1342,6 +1369,10 @@ "default": false, "description": "Opt-in flag that reads digit-flanked math operators (`5 x 3`,\n`2 ^ 10`, `6 ÷ 2`) as words instead of leaving them for the\ndefault number reader. Off by default because in real traffic\ndigit-flanked `NxN` is more often a product dimension, the\n`24x7` idiom, or a vehicle-registration code than an actual\nmultiplication.\n\nWhen `true`, the normalizer replaces the operator with the\nspoken word matched to `number_pronunciation_language`:\n\n| Glyphs | en (default / fallback) | hi | mr |\n|---|---|---|---|\n| `×` `x` `X` `*` | times | गुणा | गुणिले |\n| `÷` and spaced `/` | divided by | बटा | भागिले |\n| `+` | plus | प्लस | अधिक |\n| spaced `-` `–` `−` | minus | माइनस | वजा |\n| `=` | equals | बराबर | बरोबर |\n| `^` `**` | to the power of | की घात | ची घात |\n\nLocalized only for `hi` and `mr`; every other language falls\nback to the English words. The operator word follows\n`number_pronunciation_language`, not the synthesis\n`language`, so `language=en, number_pronunciation_language=hi`\nreads `6 x 7` as \"छः गुणा सात\".\n\nMatching rules: unambiguous glyphs (`× ÷ * ^ ** = +` and the\nwrong-glyph `x`/`X`) fire glued or spaced (`5x3`, `5 x 3`).\nThe ambiguous `-` `–` `−` and `/` fire only when\nspace-padded, so `5-3` stays a range and `1/2` stays a\nfraction. See [Math notation](/models/documentation/text-to-speech-lightning/math-notation)\nfor the full lexicon, known limitations (product dimensions,\n`24x7` idiom, vehicle-reg codes), and EU-language\nlocalizations.\n" }, + "content_filter": { + "$ref": "#/components/schemas/TtsRequestContentFilter", + "description": "Opt-in profanity filter for the submitted text. Off by default;\npassing this object is the only way to turn it on. The filter\nnever rewrites your text — it either lets the request through or\nrejects it before synthesis.\n\n`action: \"reject\"` returns HTTP 400 with `error_code:\n\"CONTENT_FILTER_BLOCKED\"`, the `language` checked and a\n`match_count`; the matched terms are never returned or logged.\n`action: \"flag\"` synthesizes normally and records the match.\n\nMatching is whole-word, not substring. If no verdict is returned\nthe request fails open and the audio is synthesized unfiltered.\n\nSee [Content filter](/models/documentation/text-to-speech-lightning/content-filter).\n" + }, "output_format": { "$ref": "#/components/schemas/TtsRequestOutputFormat", "default": "pcm",