From 3528e5b9b8f8b2d3fe9f623765ffe03e06053248 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 16 Jun 2026 11:06:04 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Commands/OpenAPIV1ApiGroupCommand.g.cs | 1 + ...IV1CreateVoiceDesignCommandApiCommand.g.cs | 190 +++++ ...io.IOpenAPIV1Client.CreateVoiceDesign.g.cs | 133 ++++ ...rters.CreateVoiceDesignResponseItemIn.g.cs | 53 ++ ...eateVoiceDesignResponseItemInNullable.g.cs | 60 ++ .../FishAudio.JsonSerializerContext.g.cs | 15 + .../FishAudio.JsonSerializerContextTypes.g.cs | 212 +++--- ...Models.CreateVoiceDesignResponse.Json.g.cs | 92 +++ ...udio.Models.CreateVoiceDesignResponse.g.cs | 47 ++ ...odels.CreateVoiceDesignResponse2.Json.g.cs | 92 +++ ...dio.Models.CreateVoiceDesignResponse2.g.cs | 55 ++ ...odels.CreateVoiceDesignResponse3.Json.g.cs | 92 +++ ...dio.Models.CreateVoiceDesignResponse3.g.cs | 55 ++ ...ls.CreateVoiceDesignResponseItem.Json.g.cs | 92 +++ ....Models.CreateVoiceDesignResponseItem.g.cs | 92 +++ ...odels.CreateVoiceDesignResponseItemIn.g.cs | 69 ++ ...udio.Models.VoiceDesignCandidate.Json.g.cs | 92 +++ ...FishAudio.Models.VoiceDesignCandidate.g.cs | 134 ++++ ...els.VoiceDesignCandidateInstruct.Json.g.cs | 92 +++ ...o.Models.VoiceDesignCandidateInstruct.g.cs | 20 + ...els.VoiceDesignCandidateLanguage.Json.g.cs | 92 +++ ...o.Models.VoiceDesignCandidateLanguage.g.cs | 20 + ....Models.VoiceDesignCandidateText.Json.g.cs | 92 +++ ...Audio.Models.VoiceDesignCandidateText.g.cs | 20 + ...hAudio.Models.VoiceDesignRequest.Json.g.cs | 92 +++ .../FishAudio.Models.VoiceDesignRequest.g.cs | 151 ++++ ...odels.VoiceDesignRequestLanguage.Json.g.cs | 92 +++ ...dio.Models.VoiceDesignRequestLanguage.g.cs | 20 + ....VoiceDesignRequestReferenceText.Json.g.cs | 92 +++ ...odels.VoiceDesignRequestReferenceText.g.cs | 20 + ...io.Models.VoiceDesignRequestSeed.Json.g.cs | 92 +++ ...shAudio.Models.VoiceDesignRequestSeed.g.cs | 20 + ...dio.OpenAPIV1Client.CreateVoiceDesign.g.cs | 675 ++++++++++++++++++ src/libs/FishAudio/openapi.json | 365 ++++++++++ 34 files changed, 3447 insertions(+), 84 deletions(-) create mode 100644 src/cli/FishAudio.CLI/Commands/OpenAPIV1CreateVoiceDesignCommandApiCommand.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.IOpenAPIV1Client.CreateVoiceDesign.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.JsonConverters.CreateVoiceDesignResponseItemIn.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.JsonConverters.CreateVoiceDesignResponseItemInNullable.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse.Json.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse2.Json.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse2.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse3.Json.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse3.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponseItem.Json.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponseItem.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponseItemIn.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidate.Json.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidate.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateInstruct.Json.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateInstruct.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateLanguage.Json.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateLanguage.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateText.Json.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateText.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequest.Json.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequest.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestLanguage.Json.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestLanguage.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestReferenceText.Json.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestReferenceText.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestSeed.Json.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestSeed.g.cs create mode 100644 src/libs/FishAudio/Generated/FishAudio.OpenAPIV1Client.CreateVoiceDesign.g.cs diff --git a/src/cli/FishAudio.CLI/Commands/OpenAPIV1ApiGroupCommand.g.cs b/src/cli/FishAudio.CLI/Commands/OpenAPIV1ApiGroupCommand.g.cs index a5768de..869381e 100644 --- a/src/cli/FishAudio.CLI/Commands/OpenAPIV1ApiGroupCommand.g.cs +++ b/src/cli/FishAudio.CLI/Commands/OpenAPIV1ApiGroupCommand.g.cs @@ -12,6 +12,7 @@ public static Command Create() command.Subcommands.Add(OpenAPIV1CreateAsrCommandApiCommand.Create()); command.Subcommands.Add(OpenAPIV1CreateTtsCommandApiCommand.Create()); command.Subcommands.Add(OpenAPIV1CreateTtsStreamWithTimestampCommandApiCommand.Create()); + command.Subcommands.Add(OpenAPIV1CreateVoiceDesignCommandApiCommand.Create()); return command; } } \ No newline at end of file diff --git a/src/cli/FishAudio.CLI/Commands/OpenAPIV1CreateVoiceDesignCommandApiCommand.g.cs b/src/cli/FishAudio.CLI/Commands/OpenAPIV1CreateVoiceDesignCommandApiCommand.g.cs new file mode 100644 index 0000000..b9df834 --- /dev/null +++ b/src/cli/FishAudio.CLI/Commands/OpenAPIV1CreateVoiceDesignCommandApiCommand.g.cs @@ -0,0 +1,190 @@ +#nullable enable +#pragma warning disable CS0618 + +using System.CommandLine; + +namespace FishAudio.CLI.Commands; + +internal static partial class OpenAPIV1CreateVoiceDesignCommandApiCommand +{ + private static Option Model { get; } = new( + name: @"--model") + { + Description = @"Specify which voice-design model to use.", + DefaultValueFactory = _ => "voice-design-1", + }; + + private static Option Instruction { get; } = new( + name: @"--instruction") + { + Description = @"Voice design prompt. Must contain 1 to 2000 characters.", + Required = true, + }; + + private static Option ReferenceText { get; } = new( + name: @"--reference-text") + { + Description = @"Optional text used as reference content for the generated voice.", + }; + + private static Option Language { get; } = new( + name: @"--language") + { + Description = @"Optional BCP-47 language hint, such as `en`, `zh`, or `ja`.", + }; + + private static Option N { get; } = new( + name: @"--n") + { + Description = @"Number of voice candidates to generate.", + }; + + private static Option Speed { get; } = new( + name: @"--speed") + { + Description = @"Speaking speed multiplier for candidate generation.", + }; + + private static Option NumStep { get; } = new( + name: @"--num-step") + { + Description = @"Number of diffusion steps used by the voice-design model.", + }; + + private static Option GuidanceScale { get; } = new( + name: @"--guidance-scale") + { + Description = @"Classifier-free guidance scale. Higher values follow the prompt more strongly.", + }; + + private static Option InstructGuidanceScale { get; } = new( + name: @"--instruct-guidance-scale") + { + Description = @"Instruction guidance scale for prompt conditioning.", + }; + + private static Option Seed { get; } = new( + name: @"--seed") + { + Description = @"Optional deterministic seed for candidate generation.", + }; + private static Option Input { get; } = new(@"--input") + { + Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", + }; + + private static Option RequestJson { get; } = new(@"--request-json") + { + Description = "Request body as JSON.", + Hidden = true, + }; + + private static Option RequestFile { get; } = new(@"--request-file") + { + Description = "Path to a JSON request file, or '-' for stdin.", + Hidden = true, + }; + + private static string FormatResponse(ParseResult parseResult, global::FishAudio.CreateVoiceDesignResponse value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) + { + string? text = null; + CustomizeResponseText(parseResult, value, ref text); + if (!string.IsNullOrWhiteSpace(text)) + { + return text; + } + + var hints = new Dictionary(StringComparer.OrdinalIgnoreCase) + { + }; + CustomizeResponseFormatHints(hints); + return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints); + } + + static partial void CustomizeResponseText(ParseResult parseResult, global::FishAudio.CreateVoiceDesignResponse value, ref string? text); + static partial void CustomizeResponseFormatHints(Dictionary hints); + + + public static Command Create() + { + var command = new Command(@"create-voice-design", @"Voice Design"); + command.Options.Add(Model); + command.Options.Add(Instruction); + command.Options.Add(ReferenceText); + command.Options.Add(Language); + command.Options.Add(N); + command.Options.Add(Speed); + command.Options.Add(NumStep); + command.Options.Add(GuidanceScale); + command.Options.Add(InstructGuidanceScale); + command.Options.Add(Seed); + command.Options.Add(Input); + command.Options.Add(RequestJson); + command.Options.Add(RequestFile); + command.Validators.Add(result => + { + var hasInput = result.GetResult(Input) is not null; + var hasRequestJson = result.GetResult(RequestJson) is not null; + var hasRequestFile = result.GetResult(RequestFile) is not null; + var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); + if (specifiedCount > 1) + { + result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); + } + }); + + command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) => + await CliRuntime.RunAsync(async () => + { + var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( + parseResult, + Input, + RequestJson, + RequestFile, + global::FishAudio.SourceGenerationContext.Default, + cancellationToken).ConfigureAwait(false); + var model = parseResult.GetRequiredValue(Model); + var instruction = parseResult.GetRequiredValue(Instruction); + var referenceText = CliRuntime.WasSpecified(parseResult, ReferenceText) ? parseResult.GetValue(ReferenceText) : (__requestBase is { } __ReferenceTextBaseValue ? __ReferenceTextBaseValue.ReferenceText : default); + var language = CliRuntime.WasSpecified(parseResult, Language) ? parseResult.GetValue(Language) : (__requestBase is { } __LanguageBaseValue ? __LanguageBaseValue.Language : default); + var n = CliRuntime.WasSpecified(parseResult, N) ? parseResult.GetValue(N) : (__requestBase is { } __NBaseValue ? __NBaseValue.N : default); + var speed = CliRuntime.WasSpecified(parseResult, Speed) ? parseResult.GetValue(Speed) : (__requestBase is { } __SpeedBaseValue ? __SpeedBaseValue.Speed : default); + var numStep = CliRuntime.WasSpecified(parseResult, NumStep) ? parseResult.GetValue(NumStep) : (__requestBase is { } __NumStepBaseValue ? __NumStepBaseValue.NumStep : default); + var guidanceScale = CliRuntime.WasSpecified(parseResult, GuidanceScale) ? parseResult.GetValue(GuidanceScale) : (__requestBase is { } __GuidanceScaleBaseValue ? __GuidanceScaleBaseValue.GuidanceScale : default); + var instructGuidanceScale = CliRuntime.WasSpecified(parseResult, InstructGuidanceScale) ? parseResult.GetValue(InstructGuidanceScale) : (__requestBase is { } __InstructGuidanceScaleBaseValue ? __InstructGuidanceScaleBaseValue.InstructGuidanceScale : default); + var seed = CliRuntime.WasSpecified(parseResult, Seed) ? parseResult.GetValue(Seed) : (__requestBase is { } __SeedBaseValue ? __SeedBaseValue.Seed : default); + using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); + + + var response = await client.OpenAPIV1.CreateVoiceDesignAsync( + model: model, + instruction: instruction, + referenceText: referenceText, + language: language, + n: n, + speed: speed, + numStep: numStep, + guidanceScale: guidanceScale, + instructGuidanceScale: instructGuidanceScale, + seed: seed, + cancellationToken: cancellationToken).ConfigureAwait(false); + + + if (!await CliRuntime.TryWriteOutputDirectoryAsync( + parseResult, + response, + global::FishAudio.SourceGenerationContext.Default, + @"Candidates", + cancellationToken).ConfigureAwait(false)) + { + await CliRuntime.WriteResponseAsync( + parseResult, + response, + global::FishAudio.SourceGenerationContext.Default, + FormatResponse, + cancellationToken).ConfigureAwait(false); + } + }, cancellationToken).ConfigureAwait(false)); + return command; + } +} \ No newline at end of file diff --git a/src/libs/FishAudio/Generated/FishAudio.IOpenAPIV1Client.CreateVoiceDesign.g.cs b/src/libs/FishAudio/Generated/FishAudio.IOpenAPIV1Client.CreateVoiceDesign.g.cs new file mode 100644 index 0000000..24f7d1f --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.IOpenAPIV1Client.CreateVoiceDesign.g.cs @@ -0,0 +1,133 @@ +#nullable enable + +namespace FishAudio +{ + public partial interface IOpenAPIV1Client + { + /// + /// Voice Design + /// + /// + /// Default Value: voice-design-1 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.fish.audio/v1/voice-design \
+ /// --header 'Authorization: Bearer <token>' \
+ /// --header 'Content-Type: application/json' \
+ /// --header 'model: voice-design-1' \
+ /// --data '{
+ /// "instruction": "Warm, confident studio narrator with a natural tone",
+ /// "reference_text": "Welcome to Fish Audio.",
+ /// "language": "en",
+ /// "n": 2,
+ /// "speed": 1,
+ /// "num_step": 32,
+ /// "guidance_scale": 2,
+ /// "instruct_guidance_scale": 0,
+ /// "seed": 42
+ /// }' + ///
+ global::System.Threading.Tasks.Task CreateVoiceDesignAsync( + + global::FishAudio.VoiceDesignRequest request, + string model = "voice-design-1", + global::FishAudio.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Voice Design + /// + /// + /// Default Value: voice-design-1 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.fish.audio/v1/voice-design \
+ /// --header 'Authorization: Bearer <token>' \
+ /// --header 'Content-Type: application/json' \
+ /// --header 'model: voice-design-1' \
+ /// --data '{
+ /// "instruction": "Warm, confident studio narrator with a natural tone",
+ /// "reference_text": "Welcome to Fish Audio.",
+ /// "language": "en",
+ /// "n": 2,
+ /// "speed": 1,
+ /// "num_step": 32,
+ /// "guidance_scale": 2,
+ /// "instruct_guidance_scale": 0,
+ /// "seed": 42
+ /// }' + ///
+ global::System.Threading.Tasks.Task> CreateVoiceDesignAsResponseAsync( + + global::FishAudio.VoiceDesignRequest request, + string model = "voice-design-1", + global::FishAudio.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Voice Design + /// + /// + /// Default Value: voice-design-1 + /// + /// + /// Voice design prompt. Must contain 1 to 2000 characters. + /// + /// + /// Optional text used as reference content for the generated voice.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Optional BCP-47 language hint, such as `en`, `zh`, or `ja`.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Number of voice candidates to generate.
+ /// Default Value: 2 + /// + /// + /// Speaking speed multiplier for candidate generation.
+ /// Default Value: 1 + /// + /// + /// Number of diffusion steps used by the voice-design model.
+ /// Default Value: 32 + /// + /// + /// Classifier-free guidance scale. Higher values follow the prompt more strongly.
+ /// Default Value: 2 + /// + /// + /// Instruction guidance scale for prompt conditioning.
+ /// Default Value: 0 + /// + /// + /// Optional deterministic seed for candidate generation.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// 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 CreateVoiceDesignAsync( + string instruction, + string model = "voice-design-1", + string? referenceText = default, + string? language = default, + int? n = default, + double? speed = default, + int? numStep = default, + double? guidanceScale = default, + double? instructGuidanceScale = default, + int? seed = default, + global::FishAudio.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/FishAudio/Generated/FishAudio.JsonConverters.CreateVoiceDesignResponseItemIn.g.cs b/src/libs/FishAudio/Generated/FishAudio.JsonConverters.CreateVoiceDesignResponseItemIn.g.cs new file mode 100644 index 0000000..1b01703 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.JsonConverters.CreateVoiceDesignResponseItemIn.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace FishAudio.JsonConverters +{ + /// + public sealed class CreateVoiceDesignResponseItemInJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::FishAudio.CreateVoiceDesignResponseItemIn 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::FishAudio.CreateVoiceDesignResponseItemInExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::FishAudio.CreateVoiceDesignResponseItemIn)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::FishAudio.CreateVoiceDesignResponseItemIn); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::FishAudio.CreateVoiceDesignResponseItemIn value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::FishAudio.CreateVoiceDesignResponseItemInExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/FishAudio/Generated/FishAudio.JsonConverters.CreateVoiceDesignResponseItemInNullable.g.cs b/src/libs/FishAudio/Generated/FishAudio.JsonConverters.CreateVoiceDesignResponseItemInNullable.g.cs new file mode 100644 index 0000000..8caee13 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.JsonConverters.CreateVoiceDesignResponseItemInNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace FishAudio.JsonConverters +{ + /// + public sealed class CreateVoiceDesignResponseItemInNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::FishAudio.CreateVoiceDesignResponseItemIn? 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::FishAudio.CreateVoiceDesignResponseItemInExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::FishAudio.CreateVoiceDesignResponseItemIn)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::FishAudio.CreateVoiceDesignResponseItemIn?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::FishAudio.CreateVoiceDesignResponseItemIn? 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::FishAudio.CreateVoiceDesignResponseItemInExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/FishAudio/Generated/FishAudio.JsonSerializerContext.g.cs b/src/libs/FishAudio/Generated/FishAudio.JsonSerializerContext.g.cs index ddb2beb..91c7811 100644 --- a/src/libs/FishAudio/Generated/FishAudio.JsonSerializerContext.g.cs +++ b/src/libs/FishAudio/Generated/FishAudio.JsonSerializerContext.g.cs @@ -161,6 +161,10 @@ namespace FishAudio typeof(global::FishAudio.JsonConverters.CreateAsrResponseItemInNullableJsonConverter), + typeof(global::FishAudio.JsonConverters.CreateVoiceDesignResponseItemInJsonConverter), + + typeof(global::FishAudio.JsonConverters.CreateVoiceDesignResponseItemInNullableJsonConverter), + typeof(global::FishAudio.JsonConverters.AnyOfJsonConverter, global::System.Collections.Generic.IList>, object>), typeof(global::FishAudio.JsonConverters.AnyOfJsonConverter, object>), @@ -246,6 +250,8 @@ namespace FishAudio [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::FishAudio.TTSTimestampSegment))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::FishAudio.ASRSegment))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::FishAudio.VoiceDesignRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::FishAudio.VoiceDesignCandidate))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::FishAudio.CreateModelRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::FishAudio.CreateModelRequestVisibility), TypeInfoPropertyName = "CreateModelRequestVisibility2_3")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::FishAudio.AnyOf, byte[]>), TypeInfoPropertyName = "AnyOfIListByteArrayByteArray2")] @@ -330,6 +336,13 @@ namespace FishAudio [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::FishAudio.CreateAsrResponseItem))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::FishAudio.CreateAsrResponseItemIn), TypeInfoPropertyName = "CreateAsrResponseItemIn2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::FishAudio.CreateVoiceDesignResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::FishAudio.CreateVoiceDesignResponse2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::FishAudio.CreateVoiceDesignResponse3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::FishAudio.CreateVoiceDesignResponseItem))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::FishAudio.CreateVoiceDesignResponseItemIn), TypeInfoPropertyName = "CreateVoiceDesignResponseItemIn2")] [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))] @@ -354,6 +367,8 @@ namespace FishAudio [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/FishAudio/Generated/FishAudio.JsonSerializerContextTypes.g.cs b/src/libs/FishAudio/Generated/FishAudio.JsonSerializerContextTypes.g.cs index 34aeabf..ea9abe6 100644 --- a/src/libs/FishAudio/Generated/FishAudio.JsonSerializerContextTypes.g.cs +++ b/src/libs/FishAudio/Generated/FishAudio.JsonSerializerContextTypes.g.cs @@ -172,339 +172,375 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::FishAudio.CreateModelRequest? Type36 { get; set; } + public global::FishAudio.VoiceDesignRequest? Type36 { get; set; } /// /// /// - public global::FishAudio.CreateModelRequestVisibility? Type37 { get; set; } + public global::FishAudio.VoiceDesignCandidate? Type37 { get; set; } /// /// /// - public global::FishAudio.AnyOf, byte[]>? Type38 { get; set; } + public global::FishAudio.CreateModelRequest? Type38 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type39 { get; set; } + public global::FishAudio.CreateModelRequestVisibility? Type39 { get; set; } /// /// /// - public global::FishAudio.AnyOf, string, object>? Type40 { get; set; } + public global::FishAudio.AnyOf, byte[]>? Type40 { get; set; } /// /// /// - public global::FishAudio.CreateModelRequest2? Type41 { get; set; } + public global::System.Collections.Generic.IList? Type41 { get; set; } /// /// /// - public global::FishAudio.CreateModelRequestVisibility2? Type42 { get; set; } + public global::FishAudio.AnyOf, string, object>? Type42 { get; set; } /// /// /// - public global::FishAudio.CreateModelRequest3? Type43 { get; set; } + public global::FishAudio.CreateModelRequest2? Type43 { get; set; } /// /// /// - public global::FishAudio.CreateModelRequestVisibility3? Type44 { get; set; } + public global::FishAudio.CreateModelRequestVisibility2? Type44 { get; set; } /// /// /// - public global::FishAudio.CreateModelRequest4? Type45 { get; set; } + public global::FishAudio.CreateModelRequest3? Type45 { get; set; } /// /// /// - public global::FishAudio.CreateModelRequestVisibility4? Type46 { get; set; } + public global::FishAudio.CreateModelRequestVisibility3? Type46 { get; set; } /// /// /// - public global::FishAudio.PatchModelRequest? Type47 { get; set; } + public global::FishAudio.CreateModelRequest4? Type47 { get; set; } /// /// /// - public global::FishAudio.PatchModelRequestVisibility2? Type48 { get; set; } + public global::FishAudio.CreateModelRequestVisibility4? Type48 { get; set; } /// /// /// - public global::FishAudio.AnyOf, string>? Type49 { get; set; } + public global::FishAudio.PatchModelRequest? Type49 { get; set; } /// /// /// - public global::FishAudio.PatchModelRequest2? Type50 { get; set; } + public global::FishAudio.PatchModelRequestVisibility2? Type50 { get; set; } /// /// /// - public global::FishAudio.PatchModelRequestVisibility4? Type51 { get; set; } + public global::FishAudio.AnyOf, string>? Type51 { get; set; } /// /// /// - public global::FishAudio.PatchModelRequest3? Type52 { get; set; } + public global::FishAudio.PatchModelRequest2? Type52 { get; set; } /// /// /// - public global::FishAudio.PatchModelRequestVisibility6? Type53 { get; set; } + public global::FishAudio.PatchModelRequestVisibility4? Type53 { get; set; } /// /// /// - public global::FishAudio.PatchModelRequest4? Type54 { get; set; } + public global::FishAudio.PatchModelRequest3? Type54 { get; set; } /// /// /// - public global::FishAudio.PatchModelRequestVisibility8? Type55 { get; set; } + public global::FishAudio.PatchModelRequestVisibility6? Type55 { get; set; } /// /// /// - public global::FishAudio.CreateAsrRequest? Type56 { get; set; } + public global::FishAudio.PatchModelRequest4? Type56 { get; set; } /// /// /// - public global::FishAudio.CreateAsrRequest2? Type57 { get; set; } + public global::FishAudio.PatchModelRequestVisibility8? Type57 { get; set; } /// /// /// - public global::FishAudio.GetModelSortBy? Type58 { get; set; } + public global::FishAudio.CreateAsrRequest? Type58 { get; set; } /// /// /// - public global::FishAudio.CreateTtsModel? Type59 { get; set; } + public global::FishAudio.CreateAsrRequest2? Type59 { get; set; } /// /// /// - public global::FishAudio.CreateTtsStreamWithTimestampModel? Type60 { get; set; } + public global::FishAudio.GetModelSortBy? Type60 { get; set; } /// /// /// - public global::FishAudio.GetWalletPackageResponse? Type61 { get; set; } + public global::FishAudio.CreateTtsModel? Type61 { get; set; } /// /// /// - public global::FishAudio.GetWalletPackageResponse2? Type62 { get; set; } + public global::FishAudio.CreateTtsStreamWithTimestampModel? Type62 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type63 { get; set; } + public global::FishAudio.GetWalletPackageResponse? Type63 { get; set; } /// /// /// - public global::FishAudio.GetWalletPackageResponseItem? Type64 { get; set; } + public global::FishAudio.GetWalletPackageResponse2? Type64 { get; set; } /// /// /// - public global::FishAudio.GetWalletPackageResponseItemIn? Type65 { get; set; } + public global::System.Collections.Generic.IList? Type65 { get; set; } /// /// /// - public global::FishAudio.GetWalletApiCreditResponse? Type66 { get; set; } + public global::FishAudio.GetWalletPackageResponseItem? Type66 { get; set; } /// /// /// - public global::FishAudio.GetWalletApiCreditResponse2? Type67 { get; set; } + public global::FishAudio.GetWalletPackageResponseItemIn? Type67 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type68 { get; set; } + public global::FishAudio.GetWalletApiCreditResponse? Type68 { get; set; } /// /// /// - public global::FishAudio.GetWalletApiCreditResponseItem? Type69 { get; set; } + public global::FishAudio.GetWalletApiCreditResponse2? Type69 { get; set; } /// /// /// - public global::FishAudio.GetWalletApiCreditResponseItemIn? Type70 { get; set; } + public global::System.Collections.Generic.IList? Type70 { get; set; } /// /// /// - public global::FishAudio.GetModelResponse? Type71 { get; set; } + public global::FishAudio.GetWalletApiCreditResponseItem? Type71 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type72 { get; set; } + public global::FishAudio.GetWalletApiCreditResponseItemIn? Type72 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type73 { get; set; } + public global::FishAudio.GetModelResponse? Type73 { get; set; } /// /// /// - public global::FishAudio.GetModelResponseItem? Type74 { get; set; } + public global::System.Collections.Generic.IList? Type74 { get; set; } /// /// /// - public global::FishAudio.GetModelResponseItemIn? Type75 { get; set; } + public global::System.Collections.Generic.IList? Type75 { get; set; } /// /// /// - public global::FishAudio.CreateModelResponse? Type76 { get; set; } + public global::FishAudio.GetModelResponseItem? Type76 { get; set; } /// /// /// - public global::FishAudio.CreateModelResponseType? Type77 { get; set; } + public global::FishAudio.GetModelResponseItemIn? Type77 { get; set; } /// /// /// - public global::FishAudio.CreateModelResponseTrainMode? Type78 { get; set; } + public global::FishAudio.CreateModelResponse? Type78 { get; set; } /// /// /// - public global::FishAudio.CreateModelResponseState? Type79 { get; set; } + public global::FishAudio.CreateModelResponseType? Type79 { get; set; } /// /// /// - public global::FishAudio.CreateModelResponseVisibility? Type80 { get; set; } + public global::FishAudio.CreateModelResponseTrainMode? Type80 { get; set; } /// /// /// - public global::FishAudio.CreateModelResponse2? Type81 { get; set; } + public global::FishAudio.CreateModelResponseState? Type81 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type82 { get; set; } + public global::FishAudio.CreateModelResponseVisibility? Type82 { get; set; } /// /// /// - public global::FishAudio.CreateModelResponseItem? Type83 { get; set; } + public global::FishAudio.CreateModelResponse2? Type83 { get; set; } /// /// /// - public global::FishAudio.CreateModelResponseItemIn? Type84 { get; set; } + public global::System.Collections.Generic.IList? Type84 { get; set; } /// /// /// - public global::FishAudio.GetModelResponse2? Type85 { get; set; } + public global::FishAudio.CreateModelResponseItem? Type85 { get; set; } /// /// /// - public global::FishAudio.GetModelResponseType? Type86 { get; set; } + public global::FishAudio.CreateModelResponseItemIn? Type86 { get; set; } /// /// /// - public global::FishAudio.GetModelResponseTrainMode? Type87 { get; set; } + public global::FishAudio.GetModelResponse2? Type87 { get; set; } /// /// /// - public global::FishAudio.GetModelResponseState? Type88 { get; set; } + public global::FishAudio.GetModelResponseType? Type88 { get; set; } /// /// /// - public global::FishAudio.GetModelResponseVisibility? Type89 { get; set; } + public global::FishAudio.GetModelResponseTrainMode? Type89 { get; set; } /// /// /// - public global::FishAudio.GetModelResponse3? Type90 { get; set; } + public global::FishAudio.GetModelResponseState? Type90 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type91 { get; set; } + public global::FishAudio.GetModelResponseVisibility? Type91 { get; set; } /// /// /// - public global::FishAudio.GetModelResponseItem2? Type92 { get; set; } + public global::FishAudio.GetModelResponse3? Type92 { get; set; } /// /// /// - public global::FishAudio.GetModelResponseItemIn2? Type93 { get; set; } + public global::System.Collections.Generic.IList? Type93 { get; set; } /// /// /// - public global::FishAudio.PatchModelResponse? Type94 { get; set; } + public global::FishAudio.GetModelResponseItem2? Type94 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type95 { get; set; } + public global::FishAudio.GetModelResponseItemIn2? Type95 { get; set; } /// /// /// - public global::FishAudio.PatchModelResponseItem? Type96 { get; set; } + public global::FishAudio.PatchModelResponse? Type96 { get; set; } /// /// /// - public global::FishAudio.PatchModelResponseItemIn? Type97 { get; set; } + public global::System.Collections.Generic.IList? Type97 { get; set; } /// /// /// - public global::FishAudio.DeleteModelResponse? Type98 { get; set; } + public global::FishAudio.PatchModelResponseItem? Type98 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type99 { get; set; } + public global::FishAudio.PatchModelResponseItemIn? Type99 { get; set; } /// /// /// - public global::FishAudio.DeleteModelResponseItem? Type100 { get; set; } + public global::FishAudio.DeleteModelResponse? Type100 { get; set; } /// /// /// - public global::FishAudio.DeleteModelResponseItemIn? Type101 { get; set; } + public global::System.Collections.Generic.IList? Type101 { get; set; } /// /// /// - public global::FishAudio.CreateTtsResponse? Type102 { get; set; } + public global::FishAudio.DeleteModelResponseItem? Type102 { get; set; } /// /// /// - public global::FishAudio.CreateTtsResponse2? Type103 { get; set; } + public global::FishAudio.DeleteModelResponseItemIn? Type103 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type104 { get; set; } + public global::FishAudio.CreateTtsResponse? Type104 { get; set; } /// /// /// - public global::FishAudio.CreateTtsResponseItem? Type105 { get; set; } + public global::FishAudio.CreateTtsResponse2? Type105 { get; set; } /// /// /// - public global::FishAudio.CreateTtsResponseItemIn? Type106 { get; set; } + public global::System.Collections.Generic.IList? Type106 { get; set; } /// /// /// - public global::FishAudio.CreateTtsStreamWithTimestampResponse? Type107 { get; set; } + public global::FishAudio.CreateTtsResponseItem? Type107 { get; set; } /// /// /// - public global::FishAudio.CreateTtsStreamWithTimestampResponse2? Type108 { get; set; } + public global::FishAudio.CreateTtsResponseItemIn? Type108 { get; set; } /// /// /// - public global::FishAudio.CreateTtsStreamWithTimestampResponse3? Type109 { get; set; } + public global::FishAudio.CreateTtsStreamWithTimestampResponse? Type109 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type110 { get; set; } + public global::FishAudio.CreateTtsStreamWithTimestampResponse2? Type110 { get; set; } /// /// /// - public global::FishAudio.CreateTtsStreamWithTimestampResponseItem? Type111 { get; set; } + public global::FishAudio.CreateTtsStreamWithTimestampResponse3? Type111 { get; set; } /// /// /// - public global::FishAudio.CreateTtsStreamWithTimestampResponseItemIn? Type112 { get; set; } + public global::System.Collections.Generic.IList? Type112 { get; set; } /// /// /// - public global::FishAudio.CreateAsrResponse? Type113 { get; set; } + public global::FishAudio.CreateTtsStreamWithTimestampResponseItem? Type113 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type114 { get; set; } + public global::FishAudio.CreateTtsStreamWithTimestampResponseItemIn? Type114 { get; set; } /// /// /// - public global::FishAudio.CreateAsrResponse2? Type115 { get; set; } + public global::FishAudio.CreateAsrResponse? Type115 { get; set; } /// /// /// - public global::FishAudio.CreateAsrResponse3? Type116 { get; set; } + public global::System.Collections.Generic.IList? Type116 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type117 { get; set; } + public global::FishAudio.CreateAsrResponse2? Type117 { get; set; } /// /// /// - public global::FishAudio.CreateAsrResponseItem? Type118 { get; set; } + public global::FishAudio.CreateAsrResponse3? Type118 { get; set; } /// /// /// - public global::FishAudio.CreateAsrResponseItemIn? Type119 { get; set; } + public global::System.Collections.Generic.IList? Type119 { get; set; } + /// + /// + /// + public global::FishAudio.CreateAsrResponseItem? Type120 { get; set; } + /// + /// + /// + public global::FishAudio.CreateAsrResponseItemIn? Type121 { get; set; } + /// + /// + /// + public global::FishAudio.CreateVoiceDesignResponse? Type122 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type123 { get; set; } + /// + /// + /// + public global::FishAudio.CreateVoiceDesignResponse2? Type124 { get; set; } + /// + /// + /// + public global::FishAudio.CreateVoiceDesignResponse3? Type125 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type126 { get; set; } + /// + /// + /// + public global::FishAudio.CreateVoiceDesignResponseItem? Type127 { get; set; } + /// + /// + /// + public global::FishAudio.CreateVoiceDesignResponseItemIn? Type128 { get; set; } /// /// @@ -602,5 +638,13 @@ public sealed partial class JsonSerializerContextTypes /// /// public global::System.Collections.Generic.List? ListType23 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType24 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType25 { get; set; } } } \ No newline at end of file diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse.Json.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse.Json.g.cs new file mode 100644 index 0000000..b80f5ba --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace FishAudio +{ + public sealed partial class CreateVoiceDesignResponse + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::FishAudio.CreateVoiceDesignResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::FishAudio.CreateVoiceDesignResponse), + jsonSerializerContext) as global::FishAudio.CreateVoiceDesignResponse; + } + + /// + /// 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::FishAudio.CreateVoiceDesignResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::FishAudio.CreateVoiceDesignResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::FishAudio.CreateVoiceDesignResponse; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse.g.cs new file mode 100644 index 0000000..18af981 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace FishAudio +{ + /// + /// + /// + public sealed partial class CreateVoiceDesignResponse + { + /// + /// Generated voice candidates. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("candidates")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Candidates { 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. + /// + /// + /// Generated voice candidates. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateVoiceDesignResponse( + global::System.Collections.Generic.IList candidates) + { + this.Candidates = candidates ?? throw new global::System.ArgumentNullException(nameof(candidates)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateVoiceDesignResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse2.Json.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse2.Json.g.cs new file mode 100644 index 0000000..7eb9b18 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace FishAudio +{ + public sealed partial class CreateVoiceDesignResponse2 + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::FishAudio.CreateVoiceDesignResponse2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::FishAudio.CreateVoiceDesignResponse2), + jsonSerializerContext) as global::FishAudio.CreateVoiceDesignResponse2; + } + + /// + /// 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::FishAudio.CreateVoiceDesignResponse2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::FishAudio.CreateVoiceDesignResponse2), + jsonSerializerContext).ConfigureAwait(false)) as global::FishAudio.CreateVoiceDesignResponse2; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse2.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse2.g.cs new file mode 100644 index 0000000..cb83e36 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse2.g.cs @@ -0,0 +1,55 @@ + +#nullable enable + +namespace FishAudio +{ + /// + /// + /// + public sealed partial class CreateVoiceDesignResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Status { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { 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. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateVoiceDesignResponse2( + int status, + string message) + { + this.Status = status; + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateVoiceDesignResponse2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse3.Json.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse3.Json.g.cs new file mode 100644 index 0000000..a84d099 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace FishAudio +{ + public sealed partial class CreateVoiceDesignResponse3 + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::FishAudio.CreateVoiceDesignResponse3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::FishAudio.CreateVoiceDesignResponse3), + jsonSerializerContext) as global::FishAudio.CreateVoiceDesignResponse3; + } + + /// + /// 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::FishAudio.CreateVoiceDesignResponse3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::FishAudio.CreateVoiceDesignResponse3), + jsonSerializerContext).ConfigureAwait(false)) as global::FishAudio.CreateVoiceDesignResponse3; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse3.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse3.g.cs new file mode 100644 index 0000000..2422100 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponse3.g.cs @@ -0,0 +1,55 @@ + +#nullable enable + +namespace FishAudio +{ + /// + /// + /// + public sealed partial class CreateVoiceDesignResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Status { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { 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. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateVoiceDesignResponse3( + int status, + string message) + { + this.Status = status; + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateVoiceDesignResponse3() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponseItem.Json.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponseItem.Json.g.cs new file mode 100644 index 0000000..810e043 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponseItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace FishAudio +{ + public sealed partial class CreateVoiceDesignResponseItem + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::FishAudio.CreateVoiceDesignResponseItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::FishAudio.CreateVoiceDesignResponseItem), + jsonSerializerContext) as global::FishAudio.CreateVoiceDesignResponseItem; + } + + /// + /// 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::FishAudio.CreateVoiceDesignResponseItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::FishAudio.CreateVoiceDesignResponseItem), + jsonSerializerContext).ConfigureAwait(false)) as global::FishAudio.CreateVoiceDesignResponseItem; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponseItem.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponseItem.g.cs new file mode 100644 index 0000000..1e4494e --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponseItem.g.cs @@ -0,0 +1,92 @@ + +#nullable enable + +namespace FishAudio +{ + /// + /// + /// + public sealed partial class CreateVoiceDesignResponseItem + { + /// + /// error field + /// + [global::System.Text.Json.Serialization.JsonPropertyName("loc")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Loc { get; set; } + + /// + /// error type + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } + + /// + /// error message + /// + [global::System.Text.Json.Serialization.JsonPropertyName("msg")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Msg { get; set; } + + /// + /// error context + /// + [global::System.Text.Json.Serialization.JsonPropertyName("ctx")] + public string? Ctx { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("in")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::FishAudio.JsonConverters.CreateVoiceDesignResponseItemInJsonConverter))] + public global::FishAudio.CreateVoiceDesignResponseItemIn? In { 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. + /// + /// + /// error field + /// + /// + /// error type + /// + /// + /// error message + /// + /// + /// error context + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateVoiceDesignResponseItem( + global::System.Collections.Generic.IList loc, + string type, + string msg, + string? ctx, + global::FishAudio.CreateVoiceDesignResponseItemIn? @in) + { + this.Loc = loc ?? throw new global::System.ArgumentNullException(nameof(loc)); + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.Msg = msg ?? throw new global::System.ArgumentNullException(nameof(msg)); + this.Ctx = ctx; + this.In = @in; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateVoiceDesignResponseItem() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponseItemIn.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponseItemIn.g.cs new file mode 100644 index 0000000..16ef5fe --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.CreateVoiceDesignResponseItemIn.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace FishAudio +{ + /// + /// + /// + public enum CreateVoiceDesignResponseItemIn + { + /// + /// + /// + Body, + /// + /// + /// + Cookie, + /// + /// + /// + Header, + /// + /// + /// + Path, + /// + /// + /// + Query, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateVoiceDesignResponseItemInExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateVoiceDesignResponseItemIn value) + { + return value switch + { + CreateVoiceDesignResponseItemIn.Body => "body", + CreateVoiceDesignResponseItemIn.Cookie => "cookie", + CreateVoiceDesignResponseItemIn.Header => "header", + CreateVoiceDesignResponseItemIn.Path => "path", + CreateVoiceDesignResponseItemIn.Query => "query", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateVoiceDesignResponseItemIn? ToEnum(string value) + { + return value switch + { + "body" => CreateVoiceDesignResponseItemIn.Body, + "cookie" => CreateVoiceDesignResponseItemIn.Cookie, + "header" => CreateVoiceDesignResponseItemIn.Header, + "path" => CreateVoiceDesignResponseItemIn.Path, + "query" => CreateVoiceDesignResponseItemIn.Query, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidate.Json.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidate.Json.g.cs new file mode 100644 index 0000000..cb0cd55 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidate.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace FishAudio +{ + public sealed partial class VoiceDesignCandidate + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::FishAudio.VoiceDesignCandidate? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::FishAudio.VoiceDesignCandidate), + jsonSerializerContext) as global::FishAudio.VoiceDesignCandidate; + } + + /// + /// 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::FishAudio.VoiceDesignCandidate? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::FishAudio.VoiceDesignCandidate), + jsonSerializerContext).ConfigureAwait(false)) as global::FishAudio.VoiceDesignCandidate; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidate.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidate.g.cs new file mode 100644 index 0000000..c73f877 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidate.g.cs @@ -0,0 +1,134 @@ + +#nullable enable + +namespace FishAudio +{ + /// + /// + /// + public sealed partial class VoiceDesignCandidate + { + /// + /// Stable candidate identifier. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Candidate index in this response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Index { get; set; } + + /// + /// Base64 encoded generated audio. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("audio_base64")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string AudioBase64 { get; set; } + + /// + /// Audio sample rate in Hz. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sample_rate")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SampleRate { get; set; } + + /// + /// Audio duration in milliseconds. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("duration_ms")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int DurationMs { get; set; } + + /// + /// Preview text associated with this generated voice, when available.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + + /// + /// Instruction text associated with this candidate, when available.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("instruct")] + public string? Instruct { get; set; } + + /// + /// Detected or requested candidate language, when available.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("language")] + public string? Language { 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. + /// + /// + /// Stable candidate identifier. + /// + /// + /// Candidate index in this response. + /// + /// + /// Base64 encoded generated audio. + /// + /// + /// Audio sample rate in Hz. + /// + /// + /// Audio duration in milliseconds. + /// + /// + /// Preview text associated with this generated voice, when available.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Instruction text associated with this candidate, when available.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Detected or requested candidate language, when available.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public VoiceDesignCandidate( + string id, + int index, + string audioBase64, + int sampleRate, + int durationMs, + string? text, + string? instruct, + string? language) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Index = index; + this.AudioBase64 = audioBase64 ?? throw new global::System.ArgumentNullException(nameof(audioBase64)); + this.SampleRate = sampleRate; + this.DurationMs = durationMs; + this.Text = text; + this.Instruct = instruct; + this.Language = language; + } + + /// + /// Initializes a new instance of the class. + /// + public VoiceDesignCandidate() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateInstruct.Json.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateInstruct.Json.g.cs new file mode 100644 index 0000000..e43726c --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateInstruct.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace FishAudio +{ + public sealed partial class VoiceDesignCandidateInstruct + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::FishAudio.VoiceDesignCandidateInstruct? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::FishAudio.VoiceDesignCandidateInstruct), + jsonSerializerContext) as global::FishAudio.VoiceDesignCandidateInstruct; + } + + /// + /// 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::FishAudio.VoiceDesignCandidateInstruct? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::FishAudio.VoiceDesignCandidateInstruct), + jsonSerializerContext).ConfigureAwait(false)) as global::FishAudio.VoiceDesignCandidateInstruct; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateInstruct.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateInstruct.g.cs new file mode 100644 index 0000000..2cfa5d9 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateInstruct.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace FishAudio +{ + /// + /// Instruction text associated with this candidate, when available.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class VoiceDesignCandidateInstruct + { + + /// + /// 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/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateLanguage.Json.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateLanguage.Json.g.cs new file mode 100644 index 0000000..6e6d1a7 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateLanguage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace FishAudio +{ + public sealed partial class VoiceDesignCandidateLanguage + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::FishAudio.VoiceDesignCandidateLanguage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::FishAudio.VoiceDesignCandidateLanguage), + jsonSerializerContext) as global::FishAudio.VoiceDesignCandidateLanguage; + } + + /// + /// 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::FishAudio.VoiceDesignCandidateLanguage? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::FishAudio.VoiceDesignCandidateLanguage), + jsonSerializerContext).ConfigureAwait(false)) as global::FishAudio.VoiceDesignCandidateLanguage; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateLanguage.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateLanguage.g.cs new file mode 100644 index 0000000..500d02c --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateLanguage.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace FishAudio +{ + /// + /// Detected or requested candidate language, when available.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class VoiceDesignCandidateLanguage + { + + /// + /// 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/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateText.Json.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateText.Json.g.cs new file mode 100644 index 0000000..c06368d --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateText.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace FishAudio +{ + public sealed partial class VoiceDesignCandidateText + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::FishAudio.VoiceDesignCandidateText? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::FishAudio.VoiceDesignCandidateText), + jsonSerializerContext) as global::FishAudio.VoiceDesignCandidateText; + } + + /// + /// 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::FishAudio.VoiceDesignCandidateText? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::FishAudio.VoiceDesignCandidateText), + jsonSerializerContext).ConfigureAwait(false)) as global::FishAudio.VoiceDesignCandidateText; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateText.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateText.g.cs new file mode 100644 index 0000000..45dc629 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignCandidateText.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace FishAudio +{ + /// + /// Preview text associated with this generated voice, when available.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class VoiceDesignCandidateText + { + + /// + /// 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/FishAudio/Generated/FishAudio.Models.VoiceDesignRequest.Json.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequest.Json.g.cs new file mode 100644 index 0000000..763c646 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace FishAudio +{ + public sealed partial class VoiceDesignRequest + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::FishAudio.VoiceDesignRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::FishAudio.VoiceDesignRequest), + jsonSerializerContext) as global::FishAudio.VoiceDesignRequest; + } + + /// + /// 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::FishAudio.VoiceDesignRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::FishAudio.VoiceDesignRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::FishAudio.VoiceDesignRequest; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequest.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequest.g.cs new file mode 100644 index 0000000..385f054 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequest.g.cs @@ -0,0 +1,151 @@ + +#nullable enable + +namespace FishAudio +{ + /// + /// Request body for synchronous voice design generation. The endpoint returns generated voice candidates with base64-encoded audio. + /// + public sealed partial class VoiceDesignRequest + { + /// + /// Voice design prompt. Must contain 1 to 2000 characters. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("instruction")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Instruction { get; set; } + + /// + /// Optional text used as reference content for the generated voice.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("reference_text")] + public string? ReferenceText { get; set; } + + /// + /// Optional BCP-47 language hint, such as `en`, `zh`, or `ja`.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("language")] + public string? Language { get; set; } + + /// + /// Number of voice candidates to generate.
+ /// Default Value: 2 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("n")] + public int? N { get; set; } + + /// + /// Speaking speed multiplier for candidate generation.
+ /// Default Value: 1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("speed")] + public double? Speed { get; set; } + + /// + /// Number of diffusion steps used by the voice-design model.
+ /// Default Value: 32 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("num_step")] + public int? NumStep { get; set; } + + /// + /// Classifier-free guidance scale. Higher values follow the prompt more strongly.
+ /// Default Value: 2 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("guidance_scale")] + public double? GuidanceScale { get; set; } + + /// + /// Instruction guidance scale for prompt conditioning.
+ /// Default Value: 0 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("instruct_guidance_scale")] + public double? InstructGuidanceScale { get; set; } + + /// + /// Optional deterministic seed for candidate generation.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public int? Seed { 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. + /// + /// + /// Voice design prompt. Must contain 1 to 2000 characters. + /// + /// + /// Optional text used as reference content for the generated voice.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Optional BCP-47 language hint, such as `en`, `zh`, or `ja`.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Number of voice candidates to generate.
+ /// Default Value: 2 + /// + /// + /// Speaking speed multiplier for candidate generation.
+ /// Default Value: 1 + /// + /// + /// Number of diffusion steps used by the voice-design model.
+ /// Default Value: 32 + /// + /// + /// Classifier-free guidance scale. Higher values follow the prompt more strongly.
+ /// Default Value: 2 + /// + /// + /// Instruction guidance scale for prompt conditioning.
+ /// Default Value: 0 + /// + /// + /// Optional deterministic seed for candidate generation.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public VoiceDesignRequest( + string instruction, + string? referenceText, + string? language, + int? n, + double? speed, + int? numStep, + double? guidanceScale, + double? instructGuidanceScale, + int? seed) + { + this.Instruction = instruction ?? throw new global::System.ArgumentNullException(nameof(instruction)); + this.ReferenceText = referenceText; + this.Language = language; + this.N = n; + this.Speed = speed; + this.NumStep = numStep; + this.GuidanceScale = guidanceScale; + this.InstructGuidanceScale = instructGuidanceScale; + this.Seed = seed; + } + + /// + /// Initializes a new instance of the class. + /// + public VoiceDesignRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestLanguage.Json.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestLanguage.Json.g.cs new file mode 100644 index 0000000..641a2b2 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestLanguage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace FishAudio +{ + public sealed partial class VoiceDesignRequestLanguage + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::FishAudio.VoiceDesignRequestLanguage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::FishAudio.VoiceDesignRequestLanguage), + jsonSerializerContext) as global::FishAudio.VoiceDesignRequestLanguage; + } + + /// + /// 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::FishAudio.VoiceDesignRequestLanguage? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::FishAudio.VoiceDesignRequestLanguage), + jsonSerializerContext).ConfigureAwait(false)) as global::FishAudio.VoiceDesignRequestLanguage; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestLanguage.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestLanguage.g.cs new file mode 100644 index 0000000..a40e94b --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestLanguage.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace FishAudio +{ + /// + /// Optional BCP-47 language hint, such as `en`, `zh`, or `ja`.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class VoiceDesignRequestLanguage + { + + /// + /// 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/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestReferenceText.Json.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestReferenceText.Json.g.cs new file mode 100644 index 0000000..e2499ba --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestReferenceText.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace FishAudio +{ + public sealed partial class VoiceDesignRequestReferenceText + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::FishAudio.VoiceDesignRequestReferenceText? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::FishAudio.VoiceDesignRequestReferenceText), + jsonSerializerContext) as global::FishAudio.VoiceDesignRequestReferenceText; + } + + /// + /// 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::FishAudio.VoiceDesignRequestReferenceText? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::FishAudio.VoiceDesignRequestReferenceText), + jsonSerializerContext).ConfigureAwait(false)) as global::FishAudio.VoiceDesignRequestReferenceText; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestReferenceText.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestReferenceText.g.cs new file mode 100644 index 0000000..6e93239 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestReferenceText.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace FishAudio +{ + /// + /// Optional text used as reference content for the generated voice.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class VoiceDesignRequestReferenceText + { + + /// + /// 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/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestSeed.Json.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestSeed.Json.g.cs new file mode 100644 index 0000000..dcaa639 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestSeed.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace FishAudio +{ + public sealed partial class VoiceDesignRequestSeed + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::FishAudio.VoiceDesignRequestSeed? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::FishAudio.VoiceDesignRequestSeed), + jsonSerializerContext) as global::FishAudio.VoiceDesignRequestSeed; + } + + /// + /// 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::FishAudio.VoiceDesignRequestSeed? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::FishAudio.VoiceDesignRequestSeed), + jsonSerializerContext).ConfigureAwait(false)) as global::FishAudio.VoiceDesignRequestSeed; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestSeed.g.cs b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestSeed.g.cs new file mode 100644 index 0000000..abfac32 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.Models.VoiceDesignRequestSeed.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace FishAudio +{ + /// + /// Optional deterministic seed for candidate generation.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class VoiceDesignRequestSeed + { + + /// + /// 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/FishAudio/Generated/FishAudio.OpenAPIV1Client.CreateVoiceDesign.g.cs b/src/libs/FishAudio/Generated/FishAudio.OpenAPIV1Client.CreateVoiceDesign.g.cs new file mode 100644 index 0000000..47216c5 --- /dev/null +++ b/src/libs/FishAudio/Generated/FishAudio.OpenAPIV1Client.CreateVoiceDesign.g.cs @@ -0,0 +1,675 @@ + +#nullable enable + +namespace FishAudio +{ + public partial class OpenAPIV1Client + { + + + private static readonly global::FishAudio.EndPointSecurityRequirement s_CreateVoiceDesignSecurityRequirement0 = + new global::FishAudio.EndPointSecurityRequirement + { + Authorizations = new global::FishAudio.EndPointAuthorizationRequirement[] + { new global::FishAudio.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::FishAudio.EndPointSecurityRequirement[] s_CreateVoiceDesignSecurityRequirements = + new global::FishAudio.EndPointSecurityRequirement[] + { s_CreateVoiceDesignSecurityRequirement0, + }; + partial void PrepareCreateVoiceDesignArguments( + global::System.Net.Http.HttpClient httpClient, + ref string model, + global::FishAudio.VoiceDesignRequest request); + partial void PrepareCreateVoiceDesignRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string model, + global::FishAudio.VoiceDesignRequest request); + partial void ProcessCreateVoiceDesignResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateVoiceDesignResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Voice Design + /// + /// + /// Default Value: voice-design-1 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.fish.audio/v1/voice-design \
+ /// --header 'Authorization: Bearer <token>' \
+ /// --header 'Content-Type: application/json' \
+ /// --header 'model: voice-design-1' \
+ /// --data '{
+ /// "instruction": "Warm, confident studio narrator with a natural tone",
+ /// "reference_text": "Welcome to Fish Audio.",
+ /// "language": "en",
+ /// "n": 2,
+ /// "speed": 1,
+ /// "num_step": 32,
+ /// "guidance_scale": 2,
+ /// "instruct_guidance_scale": 0,
+ /// "seed": 42
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task CreateVoiceDesignAsync( + + global::FishAudio.VoiceDesignRequest request, + string model = "voice-design-1", + global::FishAudio.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateVoiceDesignAsResponseAsync( + + request: request, + model: model, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Voice Design + /// + /// + /// Default Value: voice-design-1 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.fish.audio/v1/voice-design \
+ /// --header 'Authorization: Bearer <token>' \
+ /// --header 'Content-Type: application/json' \
+ /// --header 'model: voice-design-1' \
+ /// --data '{
+ /// "instruction": "Warm, confident studio narrator with a natural tone",
+ /// "reference_text": "Welcome to Fish Audio.",
+ /// "language": "en",
+ /// "n": 2,
+ /// "speed": 1,
+ /// "num_step": 32,
+ /// "guidance_scale": 2,
+ /// "instruct_guidance_scale": 0,
+ /// "seed": 42
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task> CreateVoiceDesignAsResponseAsync( + + global::FishAudio.VoiceDesignRequest request, + string model = "voice-design-1", + global::FishAudio.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateVoiceDesignArguments( + httpClient: HttpClient, + model: ref model, + request: request); + + + var __authorizations = global::FishAudio.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateVoiceDesignSecurityRequirements, + operationName: "CreateVoiceDesignAsync"); + + using var __timeoutCancellationTokenSource = global::FishAudio.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::FishAudio.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::FishAudio.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::FishAudio.PathBuilder( + path: "/v1/voice-design", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::FishAudio.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + __httpRequest.Headers.TryAddWithoutValidation("model", model.ToString()); + + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::FishAudio.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateVoiceDesignRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + model: model!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::FishAudio.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::FishAudio.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createVoiceDesign", + methodName: "CreateVoiceDesignAsync", + pathTemplate: "\"/v1/voice-design\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::FishAudio.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::FishAudio.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::FishAudio.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createVoiceDesign", + methodName: "CreateVoiceDesignAsync", + pathTemplate: "\"/v1/voice-design\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::FishAudio.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::FishAudio.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::FishAudio.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::FishAudio.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::FishAudio.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createVoiceDesign", + methodName: "CreateVoiceDesignAsync", + pathTemplate: "\"/v1/voice-design\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::FishAudio.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); + ProcessCreateVoiceDesignResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::FishAudio.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::FishAudio.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createVoiceDesign", + methodName: "CreateVoiceDesignAsync", + pathTemplate: "\"/v1/voice-design\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::FishAudio.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::FishAudio.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createVoiceDesign", + methodName: "CreateVoiceDesignAsync", + pathTemplate: "\"/v1/voice-design\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // No permission -- see authorization schemes + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::FishAudio.CreateVoiceDesignResponse2? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::FishAudio.CreateVoiceDesignResponse2.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::FishAudio.CreateVoiceDesignResponse2.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::FishAudio.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)); + } + // No payment -- see charging schemes + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::System.Exception? __exception_402 = null; + global::FishAudio.CreateVoiceDesignResponse3? __value_402 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_402 = global::FishAudio.CreateVoiceDesignResponse3.FromJson(__content_402, JsonSerializerContext); + } + else + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_402 = global::FishAudio.CreateVoiceDesignResponse3.FromJson(__content_402, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_402 = __ex; + } + + + throw global::FishAudio.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_402, + responseBody: __content_402, + responseObject: __value_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::System.Collections.Generic.IList? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content_422, typeof(global::System.Collections.Generic.IList), JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content_422, typeof(global::System.Collections.Generic.IList), JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::FishAudio.ApiException>.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + 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); + ProcessCreateVoiceDesignResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::FishAudio.CreateVoiceDesignResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::FishAudio.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::FishAudio.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::FishAudio.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::FishAudio.CreateVoiceDesignResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::FishAudio.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::FishAudio.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::FishAudio.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(); + } + } + /// + /// Voice Design + /// + /// + /// Default Value: voice-design-1 + /// + /// + /// Voice design prompt. Must contain 1 to 2000 characters. + /// + /// + /// Optional text used as reference content for the generated voice.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Optional BCP-47 language hint, such as `en`, `zh`, or `ja`.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Number of voice candidates to generate.
+ /// Default Value: 2 + /// + /// + /// Speaking speed multiplier for candidate generation.
+ /// Default Value: 1 + /// + /// + /// Number of diffusion steps used by the voice-design model.
+ /// Default Value: 32 + /// + /// + /// Classifier-free guidance scale. Higher values follow the prompt more strongly.
+ /// Default Value: 2 + /// + /// + /// Instruction guidance scale for prompt conditioning.
+ /// Default Value: 0 + /// + /// + /// Optional deterministic seed for candidate generation.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// 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 CreateVoiceDesignAsync( + string instruction, + string model = "voice-design-1", + string? referenceText = default, + string? language = default, + int? n = default, + double? speed = default, + int? numStep = default, + double? guidanceScale = default, + double? instructGuidanceScale = default, + int? seed = default, + global::FishAudio.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::FishAudio.VoiceDesignRequest + { + Instruction = instruction, + ReferenceText = referenceText, + Language = language, + N = n, + Speed = speed, + NumStep = numStep, + GuidanceScale = guidanceScale, + InstructGuidanceScale = instructGuidanceScale, + Seed = seed, + }; + + return await CreateVoiceDesignAsync( + model: model, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/FishAudio/openapi.json b/src/libs/FishAudio/openapi.json index 70beecf..09a661b 100644 --- a/src/libs/FishAudio/openapi.json +++ b/src/libs/FishAudio/openapi.json @@ -3773,6 +3773,182 @@ "OpenAPI v1" ] } + }, + "/v1/voice-design": { + "post": { + "summary": "Voice Design", + "security": [ + { + "BearerAuth": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "model", + "description": "Specify which voice-design model to use.", + "required": true, + "schema": { + "const": "voice-design-1", + "default": "voice-design-1", + "title": "Model", + "type": "string" + }, + "deprecated": false + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceDesignRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Request fulfilled, document follows", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "candidates": { + "description": "Generated voice candidates.", + "items": { + "$ref": "#/components/schemas/VoiceDesignCandidate" + }, + "title": "Candidates", + "type": "array" + } + }, + "required": [ + "candidates" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "No permission -- see authorization schemes", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "title": "Status", + "type": "integer" + }, + "message": { + "title": "Message", + "type": "string" + } + }, + "required": [ + "status", + "message" + ], + "type": "object" + } + } + } + }, + "402": { + "description": "No payment -- see charging schemes", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "title": "Status", + "type": "integer" + }, + "message": { + "title": "Message", + "type": "string" + } + }, + "required": [ + "status", + "message" + ], + "type": "object" + } + } + } + }, + "422": { + "description": "", + "headers": {}, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "loc": { + "title": "Location", + "description": "error field", + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "title": "Type", + "description": "error type", + "type": "string" + }, + "msg": { + "title": "Message", + "description": "error message", + "type": "string" + }, + "ctx": { + "title": "Context", + "description": "error context", + "type": "string" + }, + "in": { + "title": "In", + "type": "string", + "enum": [ + "path", + "query", + "header", + "cookie", + "body" + ] + } + }, + "required": [ + "loc", + "type", + "msg" + ] + } + } + } + } + } + }, + "tags": [ + "OpenAPI v1" + ], + "x-codeSamples": [ + { + "lang": "bash", + "label": "Voice Design", + "source": "curl --request POST \\\n --url https://api.fish.audio/v1/voice-design \\\n --header 'Authorization: Bearer ' \\\n --header 'Content-Type: application/json' \\\n --header 'model: voice-design-1' \\\n --data '{\n \"instruction\": \"Warm, confident studio narrator with a natural tone\",\n \"reference_text\": \"Welcome to Fish Audio.\",\n \"language\": \"en\",\n \"n\": 2,\n \"speed\": 1,\n \"num_step\": 32,\n \"guidance_scale\": 2,\n \"instruct_guidance_scale\": 0,\n \"seed\": 42\n }'" + } + ] + } } }, "tags": [], @@ -4603,6 +4779,195 @@ ], "title": "ASRSegment", "type": "object" + }, + "VoiceDesignRequest": { + "additionalProperties": false, + "description": "Request body for synchronous voice design generation. The endpoint returns generated voice candidates with base64-encoded audio.", + "examples": [ + { + "guidance_scale": 2, + "instruct_guidance_scale": 0, + "instruction": "Warm, confident studio narrator with a natural tone", + "language": "en", + "n": 2, + "num_step": 32, + "reference_text": "Welcome to Fish Audio.", + "seed": 42, + "speed": 1 + } + ], + "properties": { + "instruction": { + "description": "Voice design prompt. Must contain 1 to 2000 characters.", + "maxLength": 2000, + "minLength": 1, + "title": "Instruction", + "type": "string" + }, + "reference_text": { + "anyOf": [ + { + "maxLength": 300, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional text used as reference content for the generated voice.", + "title": "Reference Text" + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional BCP-47 language hint, such as `en`, `zh`, or `ja`.", + "title": "Language" + }, + "n": { + "default": 2, + "description": "Number of voice candidates to generate.", + "maximum": 4, + "minimum": 1, + "title": "N", + "type": "integer" + }, + "speed": { + "default": 1, + "description": "Speaking speed multiplier for candidate generation.", + "exclusiveMinimum": 0, + "maximum": 3, + "title": "Speed", + "type": "number" + }, + "num_step": { + "default": 32, + "description": "Number of diffusion steps used by the voice-design model.", + "maximum": 128, + "minimum": 1, + "title": "Num Step", + "type": "integer" + }, + "guidance_scale": { + "default": 2, + "description": "Classifier-free guidance scale. Higher values follow the prompt more strongly.", + "minimum": 0, + "title": "Guidance Scale", + "type": "number" + }, + "instruct_guidance_scale": { + "default": 0, + "description": "Instruction guidance scale for prompt conditioning.", + "minimum": 0, + "title": "Instruct Guidance Scale", + "type": "number" + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional deterministic seed for candidate generation.", + "title": "Seed" + } + }, + "required": [ + "instruction" + ], + "title": "VoiceDesignRequest", + "type": "object" + }, + "VoiceDesignCandidate": { + "properties": { + "id": { + "description": "Stable candidate identifier.", + "title": "Id", + "type": "string" + }, + "index": { + "description": "Candidate index in this response.", + "minimum": 0, + "title": "Index", + "type": "integer" + }, + "audio_base64": { + "description": "Base64 encoded generated audio.", + "title": "Audio Base64", + "type": "string" + }, + "sample_rate": { + "description": "Audio sample rate in Hz.", + "exclusiveMinimum": 0, + "title": "Sample Rate", + "type": "integer" + }, + "duration_ms": { + "description": "Audio duration in milliseconds.", + "minimum": 0, + "title": "Duration Ms", + "type": "integer" + }, + "text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Preview text associated with this generated voice, when available.", + "title": "Text" + }, + "instruct": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Instruction text associated with this candidate, when available.", + "title": "Instruct" + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Detected or requested candidate language, when available.", + "title": "Language" + } + }, + "required": [ + "id", + "index", + "audio_base64", + "sample_rate", + "duration_ms" + ], + "title": "VoiceDesignCandidate", + "type": "object" } } },