diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateVoiceV1VoicesAddPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateVoiceV1ElevenlabsV1VoicesAddPost.g.cs similarity index 79% rename from src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateVoiceV1VoicesAddPost.g.cs rename to src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateVoiceV1ElevenlabsV1VoicesAddPost.g.cs index c7e44c1..63dc0bf 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateVoiceV1VoicesAddPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateVoiceV1ElevenlabsV1VoicesAddPost.g.cs @@ -5,16 +5,16 @@ namespace DeepInfra { public partial class DeepInfraApi { - partial void PrepareCreateVoiceV1VoicesAddPostArguments( + partial void PrepareCreateVoiceV1ElevenlabsV1VoicesAddPostArguments( global::System.Net.Http.HttpClient httpClient); - partial void PrepareCreateVoiceV1VoicesAddPostRequest( + partial void PrepareCreateVoiceV1ElevenlabsV1VoicesAddPostRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage); - partial void ProcessCreateVoiceV1VoicesAddPostResponse( + partial void ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); - partial void ProcessCreateVoiceV1VoicesAddPostResponseContent( + partial void ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponseContent( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage, ref string content); @@ -25,22 +25,22 @@ partial void ProcessCreateVoiceV1VoicesAddPostResponseContent( /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task CreateVoiceV1VoicesAddPostAsync( + public async global::System.Threading.Tasks.Task CreateVoiceV1ElevenlabsV1VoicesAddPostAsync( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: _httpClient); - PrepareCreateVoiceV1VoicesAddPostArguments( + PrepareCreateVoiceV1ElevenlabsV1VoicesAddPostArguments( httpClient: _httpClient); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/voices/add", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/elevenlabs/v1/voices/add", global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, request: httpRequest); - PrepareCreateVoiceV1VoicesAddPostRequest( + PrepareCreateVoiceV1ElevenlabsV1VoicesAddPostRequest( httpClient: _httpClient, httpRequestMessage: httpRequest); @@ -52,7 +52,7 @@ partial void ProcessCreateVoiceV1VoicesAddPostResponseContent( ProcessResponse( client: _httpClient, response: response); - ProcessCreateVoiceV1VoicesAddPostResponse( + ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponse( httpClient: _httpClient, httpResponseMessage: response); @@ -62,7 +62,7 @@ partial void ProcessCreateVoiceV1VoicesAddPostResponseContent( client: _httpClient, response: response, content: ref __content); - ProcessCreateVoiceV1VoicesAddPostResponseContent( + ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponseContent( httpClient: _httpClient, httpResponseMessage: response, content: ref __content); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteVoiceV1VoicesVoiceIdDelete.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteVoiceV1ElevenlabsV1VoicesVoiceIdDelete.g.cs similarity index 79% rename from src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteVoiceV1VoicesVoiceIdDelete.g.cs rename to src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteVoiceV1ElevenlabsV1VoicesVoiceIdDelete.g.cs index 7033358..2df1ddb 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteVoiceV1VoicesVoiceIdDelete.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteVoiceV1ElevenlabsV1VoicesVoiceIdDelete.g.cs @@ -5,18 +5,18 @@ namespace DeepInfra { public partial class DeepInfraApi { - partial void PrepareDeleteVoiceV1VoicesVoiceIdDeleteArguments( + partial void PrepareDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteArguments( global::System.Net.Http.HttpClient httpClient, ref string voiceId); - partial void PrepareDeleteVoiceV1VoicesVoiceIdDeleteRequest( + partial void PrepareDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, string voiceId); - partial void ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponse( + partial void ProcessDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); - partial void ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponseContent( + partial void ProcessDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponseContent( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage, ref string content); @@ -27,24 +27,24 @@ partial void ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponseContent( /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task DeleteVoiceV1VoicesVoiceIdDeleteAsync( + public async global::System.Threading.Tasks.Task DeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteAsync( string voiceId, global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: _httpClient); - PrepareDeleteVoiceV1VoicesVoiceIdDeleteArguments( + PrepareDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteArguments( httpClient: _httpClient, voiceId: ref voiceId); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/voices/{voiceId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/elevenlabs/v1/voices/{voiceId}", global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, request: httpRequest); - PrepareDeleteVoiceV1VoicesVoiceIdDeleteRequest( + PrepareDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteRequest( httpClient: _httpClient, httpRequestMessage: httpRequest, voiceId: voiceId); @@ -57,7 +57,7 @@ partial void ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponseContent( ProcessResponse( client: _httpClient, response: response); - ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponse( + ProcessDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponse( httpClient: _httpClient, httpResponseMessage: response); @@ -67,7 +67,7 @@ partial void ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponseContent( client: _httpClient, response: response, content: ref __content); - ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponseContent( + ProcessDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponseContent( httpClient: _httpClient, httpResponseMessage: response, content: ref __content); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoiceV1VoicesVoiceIdGet.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoiceV1ElevenlabsV1VoicesVoiceIdGet.g.cs similarity index 80% rename from src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoiceV1VoicesVoiceIdGet.g.cs rename to src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoiceV1ElevenlabsV1VoicesVoiceIdGet.g.cs index 40426ff..c328e69 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoiceV1VoicesVoiceIdGet.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoiceV1ElevenlabsV1VoicesVoiceIdGet.g.cs @@ -5,18 +5,18 @@ namespace DeepInfra { public partial class DeepInfraApi { - partial void PrepareGetVoiceV1VoicesVoiceIdGetArguments( + partial void PrepareGetVoiceV1ElevenlabsV1VoicesVoiceIdGetArguments( global::System.Net.Http.HttpClient httpClient, ref string voiceId); - partial void PrepareGetVoiceV1VoicesVoiceIdGetRequest( + partial void PrepareGetVoiceV1ElevenlabsV1VoicesVoiceIdGetRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, string voiceId); - partial void ProcessGetVoiceV1VoicesVoiceIdGetResponse( + partial void ProcessGetVoiceV1ElevenlabsV1VoicesVoiceIdGetResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); - partial void ProcessGetVoiceV1VoicesVoiceIdGetResponseContent( + partial void ProcessGetVoiceV1ElevenlabsV1VoicesVoiceIdGetResponseContent( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage, ref string content); @@ -28,24 +28,24 @@ partial void ProcessGetVoiceV1VoicesVoiceIdGetResponseContent( /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task GetVoiceV1VoicesVoiceIdGetAsync( + public async global::System.Threading.Tasks.Task GetVoiceV1ElevenlabsV1VoicesVoiceIdGetAsync( string voiceId, global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: _httpClient); - PrepareGetVoiceV1VoicesVoiceIdGetArguments( + PrepareGetVoiceV1ElevenlabsV1VoicesVoiceIdGetArguments( httpClient: _httpClient, voiceId: ref voiceId); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/voices/{voiceId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/elevenlabs/v1/voices/{voiceId}", global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, request: httpRequest); - PrepareGetVoiceV1VoicesVoiceIdGetRequest( + PrepareGetVoiceV1ElevenlabsV1VoicesVoiceIdGetRequest( httpClient: _httpClient, httpRequestMessage: httpRequest, voiceId: voiceId); @@ -58,7 +58,7 @@ partial void ProcessGetVoiceV1VoicesVoiceIdGetResponseContent( ProcessResponse( client: _httpClient, response: response); - ProcessGetVoiceV1VoicesVoiceIdGetResponse( + ProcessGetVoiceV1ElevenlabsV1VoicesVoiceIdGetResponse( httpClient: _httpClient, httpResponseMessage: response); @@ -68,7 +68,7 @@ partial void ProcessGetVoiceV1VoicesVoiceIdGetResponseContent( client: _httpClient, response: response, content: ref __content); - ProcessGetVoiceV1VoicesVoiceIdGetResponseContent( + ProcessGetVoiceV1ElevenlabsV1VoicesVoiceIdGetResponseContent( httpClient: _httpClient, httpResponseMessage: response, content: ref __content); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoicesV1VoicesGet.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoicesV1ElevenlabsV1VoicesGet.g.cs similarity index 80% rename from src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoicesV1VoicesGet.g.cs rename to src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoicesV1ElevenlabsV1VoicesGet.g.cs index 27d3212..280d549 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoicesV1VoicesGet.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoicesV1ElevenlabsV1VoicesGet.g.cs @@ -5,16 +5,16 @@ namespace DeepInfra { public partial class DeepInfraApi { - partial void PrepareGetVoicesV1VoicesGetArguments( + partial void PrepareGetVoicesV1ElevenlabsV1VoicesGetArguments( global::System.Net.Http.HttpClient httpClient); - partial void PrepareGetVoicesV1VoicesGetRequest( + partial void PrepareGetVoicesV1ElevenlabsV1VoicesGetRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage); - partial void ProcessGetVoicesV1VoicesGetResponse( + partial void ProcessGetVoicesV1ElevenlabsV1VoicesGetResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); - partial void ProcessGetVoicesV1VoicesGetResponseContent( + partial void ProcessGetVoicesV1ElevenlabsV1VoicesGetResponseContent( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage, ref string content); @@ -25,22 +25,22 @@ partial void ProcessGetVoicesV1VoicesGetResponseContent( /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task GetVoicesV1VoicesGetAsync( + public async global::System.Threading.Tasks.Task GetVoicesV1ElevenlabsV1VoicesGetAsync( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: _httpClient); - PrepareGetVoicesV1VoicesGetArguments( + PrepareGetVoicesV1ElevenlabsV1VoicesGetArguments( httpClient: _httpClient); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/voices", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/elevenlabs/v1/voices", global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, request: httpRequest); - PrepareGetVoicesV1VoicesGetRequest( + PrepareGetVoicesV1ElevenlabsV1VoicesGetRequest( httpClient: _httpClient, httpRequestMessage: httpRequest); @@ -52,7 +52,7 @@ partial void ProcessGetVoicesV1VoicesGetResponseContent( ProcessResponse( client: _httpClient, response: response); - ProcessGetVoicesV1VoicesGetResponse( + ProcessGetVoicesV1ElevenlabsV1VoicesGetResponse( httpClient: _httpClient, httpResponseMessage: response); @@ -62,7 +62,7 @@ partial void ProcessGetVoicesV1VoicesGetResponseContent( client: _httpClient, response: response, content: ref __content); - ProcessGetVoicesV1VoicesGetResponseContent( + ProcessGetVoicesV1ElevenlabsV1VoicesGetResponseContent( httpClient: _httpClient, httpResponseMessage: response, content: ref __content); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioSpeechV1OpenaiAudioSpeechPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioSpeechV1OpenaiAudioSpeechPost.g.cs index e498005..3a39b60 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioSpeechV1OpenaiAudioSpeechPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioSpeechV1OpenaiAudioSpeechPost.g.cs @@ -103,16 +103,16 @@ partial void ProcessOpenaiAudioSpeechV1OpenaiAudioSpeechPostResponseContent( /// Openai Audio Speech /// /// - /// - /// The webhook to call when inference is done, by default you will get the output in the response of your inference request - /// /// /// model name
/// Example: deepinfra/tts /// /// - /// text to convert to speech
- /// Example: Hello, how are you? + /// Text to convert to speech
+ /// Example: I'm beginnin' to feel like a Rap God, Rap God
+ /// All my people from the front to the back nod, back nod
+ /// Now, who thinks their arms are long enough to slap box, slap box?
+ /// They said I rap like a robot, so call me Rap-bot /// /// /// Preset voices to use for the speech. @@ -130,7 +130,6 @@ partial void ProcessOpenaiAudioSpeechV1OpenaiAudioSpeechPostResponseContent( string model, string input, string xDeepinfraSource = default, - string? webhook = default, global::System.AllOf? voice = default, global::System.AllOf? responseFormat = default, double speed = 1, @@ -138,7 +137,6 @@ partial void ProcessOpenaiAudioSpeechV1OpenaiAudioSpeechPostResponseContent( { var request = new global::DeepInfra.OpenAITextToSpeechIn { - Webhook = webhook, Model = model, Input = input, Voice = voice, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.TextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.TextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPost.g.cs new file mode 100644 index 0000000..98d02d6 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.TextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPost.g.cs @@ -0,0 +1,157 @@ + +#nullable enable + +namespace DeepInfra +{ + public partial class DeepInfraApi + { + partial void PrepareTextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPostArguments( + global::System.Net.Http.HttpClient httpClient, + ref string voiceId, + ref string xDeepinfraSource, + global::DeepInfra.ElevenLabsTextToSpeechIn request); + partial void PrepareTextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPostRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string voiceId, + string xDeepinfraSource, + global::DeepInfra.ElevenLabsTextToSpeechIn request); + partial void ProcessTextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPostResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessTextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPostResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Text To Speech + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task TextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPostAsync( + string voiceId, + string xDeepinfraSource, + global::DeepInfra.ElevenLabsTextToSpeechIn request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareTextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPostArguments( + httpClient: _httpClient, + voiceId: ref voiceId, + xDeepinfraSource: ref xDeepinfraSource, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/elevenlabs/v1/text-to-speech/{voiceId}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.ElevenLabsTextToSpeechIn), + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareTextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPostRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + voiceId: voiceId, + xDeepinfraSource: xDeepinfraSource, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessTextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPostResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessTextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPostResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, global::DeepInfra.SourceGenerationContext.Default.Object) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Text To Speech + /// + /// + /// + /// + /// Text to convert to speech
+ /// Example: I'm beginnin' to feel like a Rap God, Rap God
+ /// All my people from the front to the back nod, back nod
+ /// Now, who thinks their arms are long enough to slap box, slap box?
+ /// They said I rap like a robot, so call me Rap-bot + /// + /// + /// Model ID to use for the conversion
+ /// Default Value: deepinfra/tts + /// + /// + /// Output format for the speech
+ /// Default Value: wav + /// + /// + /// ISO 639-1, 2 letter language code + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task TextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPostAsync( + string voiceId, + string text, + string xDeepinfraSource = default, + global::System.AllOf? modelId = default, + global::System.AllOf? outputFormat = default, + string? languageCode = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::DeepInfra.ElevenLabsTextToSpeechIn + { + Text = text, + ModelId = modelId, + OutputFormat = outputFormat, + LanguageCode = languageCode, + }; + + return await TextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPostAsync( + voiceId: voiceId, + xDeepinfraSource: xDeepinfraSource, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UpdateVoiceV1VoicesVoiceIdEditPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPost.g.cs similarity index 82% rename from src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UpdateVoiceV1VoicesVoiceIdEditPost.g.cs rename to src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPost.g.cs index 72a9894..20c3272 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UpdateVoiceV1VoicesVoiceIdEditPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPost.g.cs @@ -5,20 +5,20 @@ namespace DeepInfra { public partial class DeepInfraApi { - partial void PrepareUpdateVoiceV1VoicesVoiceIdEditPostArguments( + partial void PrepareUpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPostArguments( global::System.Net.Http.HttpClient httpClient, ref string voiceId, global::DeepInfra.UpdateVoiceIn request); - partial void PrepareUpdateVoiceV1VoicesVoiceIdEditPostRequest( + partial void PrepareUpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPostRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, string voiceId, global::DeepInfra.UpdateVoiceIn request); - partial void ProcessUpdateVoiceV1VoicesVoiceIdEditPostResponse( + partial void ProcessUpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPostResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); - partial void ProcessUpdateVoiceV1VoicesVoiceIdEditPostResponseContent( + partial void ProcessUpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPostResponseContent( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage, ref string content); @@ -30,7 +30,7 @@ partial void ProcessUpdateVoiceV1VoicesVoiceIdEditPostResponseContent( /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task UpdateVoiceV1VoicesVoiceIdEditPostAsync( + public async global::System.Threading.Tasks.Task UpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPostAsync( string voiceId, global::DeepInfra.UpdateVoiceIn request, global::System.Threading.CancellationToken cancellationToken = default) @@ -39,14 +39,14 @@ partial void ProcessUpdateVoiceV1VoicesVoiceIdEditPostResponseContent( PrepareArguments( client: _httpClient); - PrepareUpdateVoiceV1VoicesVoiceIdEditPostArguments( + PrepareUpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPostArguments( httpClient: _httpClient, voiceId: ref voiceId, request: request); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/voices/{voiceId}/edit", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/elevenlabs/v1/voices/{voiceId}/edit", global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContent = new global::System.Net.Http.StringContent( content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.UpdateVoiceIn), encoding: global::System.Text.Encoding.UTF8, @@ -56,7 +56,7 @@ partial void ProcessUpdateVoiceV1VoicesVoiceIdEditPostResponseContent( PrepareRequest( client: _httpClient, request: httpRequest); - PrepareUpdateVoiceV1VoicesVoiceIdEditPostRequest( + PrepareUpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPostRequest( httpClient: _httpClient, httpRequestMessage: httpRequest, voiceId: voiceId, @@ -70,7 +70,7 @@ partial void ProcessUpdateVoiceV1VoicesVoiceIdEditPostResponseContent( ProcessResponse( client: _httpClient, response: response); - ProcessUpdateVoiceV1VoicesVoiceIdEditPostResponse( + ProcessUpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPostResponse( httpClient: _httpClient, httpResponseMessage: response); @@ -80,7 +80,7 @@ partial void ProcessUpdateVoiceV1VoicesVoiceIdEditPostResponseContent( client: _httpClient, response: response, content: ref __content); - ProcessUpdateVoiceV1VoicesVoiceIdEditPostResponseContent( + ProcessUpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPostResponseContent( httpClient: _httpClient, httpResponseMessage: response, content: ref __content); @@ -107,7 +107,7 @@ partial void ProcessUpdateVoiceV1VoicesVoiceIdEditPostResponseContent( /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task UpdateVoiceV1VoicesVoiceIdEditPostAsync( + public async global::System.Threading.Tasks.Task UpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPostAsync( string voiceId, string name, string description, @@ -119,7 +119,7 @@ partial void ProcessUpdateVoiceV1VoicesVoiceIdEditPostResponseContent( Description = description, }; - return await UpdateVoiceV1VoicesVoiceIdEditPostAsync( + return await UpdateVoiceV1ElevenlabsV1VoicesVoiceIdEditPostAsync( voiceId: voiceId, request: request, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechIn.g.cs new file mode 100644 index 0000000..9912994 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechIn.g.cs @@ -0,0 +1,52 @@ + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class ElevenLabsTextToSpeechIn + { + /// + /// Text to convert to speech
+ /// Example: I'm beginnin' to feel like a Rap God, Rap God
+ /// All my people from the front to the back nod, back nod
+ /// Now, who thinks their arms are long enough to slap box, slap box?
+ /// They said I rap like a robot, so call me Rap-bot + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Model ID to use for the conversion
+ /// Default Value: deepinfra/tts + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("model_id")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1))] + public global::System.AllOf? ModelId { get; set; } = "deepinfra/tts"; + + /// + /// Output format for the speech
+ /// Default Value: wav + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1))] + public global::System.AllOf? OutputFormat { get; set; } = "wav"; + + /// + /// ISO 639-1, 2 letter language code + /// + [global::System.Text.Json.Serialization.JsonPropertyName("language_code")] + public string? LanguageCode { 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(); + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechInModelId.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechInModelId.g.cs new file mode 100644 index 0000000..b2f26fc --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechInModelId.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// An enumeration. + /// + public enum ElevenLabsTextToSpeechInModelId + { + /// + /// + /// + DeepinfraTts, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ElevenLabsTextToSpeechInModelIdExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ElevenLabsTextToSpeechInModelId value) + { + return value switch + { + ElevenLabsTextToSpeechInModelId.DeepinfraTts => "deepinfra/tts", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ElevenLabsTextToSpeechInModelId? ToEnum(string value) + { + return value switch + { + "deepinfra/tts" => ElevenLabsTextToSpeechInModelId.DeepinfraTts, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechInOutputFormat.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechInOutputFormat.g.cs new file mode 100644 index 0000000..ceb4619 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechInOutputFormat.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// An enumeration. + /// + public enum ElevenLabsTextToSpeechInOutputFormat + { + /// + /// + /// + Wav, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ElevenLabsTextToSpeechInOutputFormatExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ElevenLabsTextToSpeechInOutputFormat value) + { + return value switch + { + ElevenLabsTextToSpeechInOutputFormat.Wav => "wav", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ElevenLabsTextToSpeechInOutputFormat? ToEnum(string value) + { + return value switch + { + "wav" => ElevenLabsTextToSpeechInOutputFormat.Wav, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAITextToSpeechIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAITextToSpeechIn.g.cs index 653679e..0a877aa 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAITextToSpeechIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAITextToSpeechIn.g.cs @@ -10,12 +10,6 @@ namespace DeepInfra /// public sealed partial class OpenAITextToSpeechIn { - /// - /// The webhook to call when inference is done, by default you will get the output in the response of your inference request - /// - [global::System.Text.Json.Serialization.JsonPropertyName("webhook")] - public string? Webhook { get; set; } - /// /// model name
/// Example: deepinfra/tts @@ -25,8 +19,11 @@ public sealed partial class OpenAITextToSpeechIn public required string Model { get; set; } /// - /// text to convert to speech
- /// Example: Hello, how are you? + /// Text to convert to speech
+ /// Example: I'm beginnin' to feel like a Rap God, Rap God
+ /// All my people from the front to the back nod, back nod
+ /// Now, who thinks their arms are long enough to slap box, slap box?
+ /// They said I rap like a robot, so call me Rap-bot ///
[global::System.Text.Json.Serialization.JsonPropertyName("input")] [global::System.Text.Json.Serialization.JsonRequired] diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.TtsModel.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.TtsModel.g.cs new file mode 100644 index 0000000..73b2e19 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.TtsModel.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// An enumeration. + /// + public enum TtsModel + { + /// + /// + /// + DeepinfraTts, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TtsModelExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TtsModel value) + { + return value switch + { + TtsModel.DeepinfraTts => "deepinfra/tts", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TtsModel? ToEnum(string value) + { + return value switch + { + "deepinfra/tts" => TtsModel.DeepinfraTts, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/JsonConverters.ElevenLabsTextToSpeechInModelId.g.cs b/src/libs/DeepInfra/Generated/JsonConverters.ElevenLabsTextToSpeechInModelId.g.cs new file mode 100644 index 0000000..e3e2345 --- /dev/null +++ b/src/libs/DeepInfra/Generated/JsonConverters.ElevenLabsTextToSpeechInModelId.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ElevenLabsTextToSpeechInModelIdJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::DeepInfra.ElevenLabsTextToSpeechInModelId 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::DeepInfra.ElevenLabsTextToSpeechInModelIdExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::DeepInfra.ElevenLabsTextToSpeechInModelId)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::DeepInfra.ElevenLabsTextToSpeechInModelId value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::DeepInfra.ElevenLabsTextToSpeechInModelIdExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/DeepInfra/Generated/JsonConverters.ElevenLabsTextToSpeechInModelIdNullable.g.cs b/src/libs/DeepInfra/Generated/JsonConverters.ElevenLabsTextToSpeechInModelIdNullable.g.cs new file mode 100644 index 0000000..bbbfe80 --- /dev/null +++ b/src/libs/DeepInfra/Generated/JsonConverters.ElevenLabsTextToSpeechInModelIdNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ElevenLabsTextToSpeechInModelIdNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::DeepInfra.ElevenLabsTextToSpeechInModelId? 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::DeepInfra.ElevenLabsTextToSpeechInModelIdExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::DeepInfra.ElevenLabsTextToSpeechInModelId)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::DeepInfra.ElevenLabsTextToSpeechInModelId? 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::DeepInfra.ElevenLabsTextToSpeechInModelIdExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/DeepInfra/Generated/JsonConverters.ElevenLabsTextToSpeechInOutputFormat.g.cs b/src/libs/DeepInfra/Generated/JsonConverters.ElevenLabsTextToSpeechInOutputFormat.g.cs new file mode 100644 index 0000000..3092f04 --- /dev/null +++ b/src/libs/DeepInfra/Generated/JsonConverters.ElevenLabsTextToSpeechInOutputFormat.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ElevenLabsTextToSpeechInOutputFormatJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::DeepInfra.ElevenLabsTextToSpeechInOutputFormat 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::DeepInfra.ElevenLabsTextToSpeechInOutputFormatExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::DeepInfra.ElevenLabsTextToSpeechInOutputFormat)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::DeepInfra.ElevenLabsTextToSpeechInOutputFormat value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::DeepInfra.ElevenLabsTextToSpeechInOutputFormatExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/DeepInfra/Generated/JsonConverters.ElevenLabsTextToSpeechInOutputFormatNullable.g.cs b/src/libs/DeepInfra/Generated/JsonConverters.ElevenLabsTextToSpeechInOutputFormatNullable.g.cs new file mode 100644 index 0000000..d0f6ef3 --- /dev/null +++ b/src/libs/DeepInfra/Generated/JsonConverters.ElevenLabsTextToSpeechInOutputFormatNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ElevenLabsTextToSpeechInOutputFormatNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::DeepInfra.ElevenLabsTextToSpeechInOutputFormat? 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::DeepInfra.ElevenLabsTextToSpeechInOutputFormatExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::DeepInfra.ElevenLabsTextToSpeechInOutputFormat)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::DeepInfra.ElevenLabsTextToSpeechInOutputFormat? 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::DeepInfra.ElevenLabsTextToSpeechInOutputFormatExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/DeepInfra/Generated/JsonConverters.TtsModel.g.cs b/src/libs/DeepInfra/Generated/JsonConverters.TtsModel.g.cs new file mode 100644 index 0000000..2038d07 --- /dev/null +++ b/src/libs/DeepInfra/Generated/JsonConverters.TtsModel.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class TtsModelJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::DeepInfra.TtsModel 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::DeepInfra.TtsModelExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::DeepInfra.TtsModel)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::DeepInfra.TtsModel value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::DeepInfra.TtsModelExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/DeepInfra/Generated/JsonConverters.TtsModelNullable.g.cs b/src/libs/DeepInfra/Generated/JsonConverters.TtsModelNullable.g.cs new file mode 100644 index 0000000..a7ebe3d --- /dev/null +++ b/src/libs/DeepInfra/Generated/JsonConverters.TtsModelNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class TtsModelNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::DeepInfra.TtsModel? 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::DeepInfra.TtsModelExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::DeepInfra.TtsModel)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::DeepInfra.TtsModel? 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::DeepInfra.TtsModelExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/DeepInfra/Generated/JsonSerializerContext.g.cs b/src/libs/DeepInfra/Generated/JsonSerializerContext.g.cs index 10a637a..76c875f 100644 --- a/src/libs/DeepInfra/Generated/JsonSerializerContext.g.cs +++ b/src/libs/DeepInfra/Generated/JsonSerializerContext.g.cs @@ -36,6 +36,10 @@ namespace DeepInfra typeof(global::OpenApiGenerator.JsonConverters.DeployTypeNullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.DeploymentOutTypeJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.DeploymentOutTypeNullableJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.ElevenLabsTextToSpeechInModelIdJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.ElevenLabsTextToSpeechInModelIdNullableJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.ElevenLabsTextToSpeechInOutputFormatJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.ElevenLabsTextToSpeechInOutputFormatNullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.HFTasksEJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.HFTasksENullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.ImageURLDetailJsonConverter), @@ -56,6 +60,8 @@ namespace DeepInfra typeof(global::OpenApiGenerator.JsonConverters.ResponseFormatTypeNullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.SchemaVariantKeyJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.SchemaVariantKeyNullableJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.TtsModelJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.TtsModelNullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.TtsResponseFormatJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.TtsResponseFormatNullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.TtsVoiceJsonConverter), diff --git a/src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs b/src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs index 9d67fb5..46b9174 100644 --- a/src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs +++ b/src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs @@ -165,290 +165,298 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.IList? Type38 { get; set; } + public global::System.AllOf? Type38 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type39 { get; set; } + public global::System.AllOf? Type39 { get; set; } /// /// /// - public global::DeepInfra.ImageURLDetail? Type40 { get; set; } + public global::System.Collections.Generic.IList? Type40 { get; set; } /// /// /// - public global::System.Collections.Generic.IList?>? Type41 { get; set; } + public global::System.Collections.Generic.IList? Type41 { get; set; } /// /// /// - public global::DeepInfra.ModelDocBlockKey? Type42 { get; set; } + public global::DeepInfra.ImageURLDetail? Type42 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type43 { get; set; } + public global::System.Collections.Generic.IList?>? Type43 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type44 { get; set; } + public global::DeepInfra.ModelDocBlockKey? Type44 { get; set; } /// /// /// - public global::System.AnyOf? Type45 { get; set; } + public global::System.Collections.Generic.IList? Type45 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type46 { get; set; } + public global::System.Collections.Generic.IList? Type46 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type47 { get; set; } + public global::System.AnyOf? Type47 { get; set; } /// /// /// - public global::System.AllOf? Type48 { get; set; } + public global::System.Collections.Generic.IList? Type48 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type49 { get; set; } + public global::System.Collections.Generic.IList? Type49 { get; set; } /// /// /// - public global::System.AnyOf? Type50 { get; set; } + public global::System.AllOf? Type50 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type51 { get; set; } + public global::System.Collections.Generic.IList? Type51 { get; set; } /// /// /// - public global::System.AnyOf?>? Type52 { get; set; } + public global::System.AnyOf? Type52 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type53 { get; set; } + public global::System.Collections.Generic.IList>? Type53 { get; set; } /// /// /// - public global::System.AllOf? Type54 { get; set; } + public global::System.AnyOf?>? Type54 { get; set; } /// /// /// - public global::System.AnyOf, string>? Type55 { get; set; } + public global::System.Collections.Generic.IList? Type55 { get; set; } /// /// /// - public global::DeepInfra.OpenAIEmbeddingsInEncodingFormat? Type56 { get; set; } + public global::System.AllOf? Type56 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type57 { get; set; } + public global::System.AnyOf, string>? Type57 { get; set; } /// /// /// - public global::System.AllOf? Type58 { get; set; } + public global::DeepInfra.OpenAIEmbeddingsInEncodingFormat? Type58 { get; set; } /// /// /// - public global::System.AllOf? Type59 { get; set; } + public global::System.Collections.Generic.IList? Type59 { get; set; } /// /// /// - public global::DeepInfra.ResponseFormatType? Type60 { get; set; } + public global::System.AllOf? Type60 { get; set; } /// /// /// - public global::DeepInfra.SchemaVariant? Type61 { get; set; } + public global::DeepInfra.ResponseFormatType? Type61 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type62 { get; set; } + public global::DeepInfra.SchemaVariant? Type62 { get; set; } /// /// /// - public global::DeepInfra.SchemaVariantKey? Type63 { get; set; } + public global::System.Collections.Generic.IList? Type63 { get; set; } /// /// /// - public global::DeepInfra.HTTPValidationError? Type64 { get; set; } + public global::DeepInfra.SchemaVariantKey? Type64 { get; set; } /// /// /// - public global::DeepInfra.Me? Type65 { get; set; } + public global::DeepInfra.HTTPValidationError? Type65 { get; set; } /// /// /// - public global::DeepInfra.MeIn? Type66 { get; set; } + public global::DeepInfra.Me? Type66 { get; set; } /// /// /// - public global::DeepInfra.DeepError? Type67 { get; set; } + public global::DeepInfra.MeIn? Type67 { get; set; } /// /// /// - public global::DeepInfra.EmailsOut? Type68 { get; set; } + public global::DeepInfra.DeepError? Type68 { get; set; } /// /// /// - public global::DeepInfra.RateLimitOut? Type69 { get; set; } + public global::DeepInfra.EmailsOut? Type69 { get; set; } /// /// /// - public global::DeepInfra.RateLimitRequestIn? Type70 { get; set; } + public global::DeepInfra.RateLimitOut? Type70 { get; set; } /// /// /// - public global::DeepInfra.DeployModelIn? Type71 { get; set; } + public global::DeepInfra.RateLimitRequestIn? Type71 { get; set; } /// /// /// - public global::DeepInfra.DeployResult? Type72 { get; set; } + public global::DeepInfra.DeployModelIn? Type72 { get; set; } /// /// /// - public global::DeepInfra.HFModel? Type73 { get; set; } + public global::DeepInfra.DeployResult? Type73 { get; set; } /// /// /// - public global::DeepInfra.DeployGPUAvailability? Type74 { get; set; } + public global::DeepInfra.HFModel? Type74 { get; set; } /// /// /// - public global::DeepInfra.DeployLLMIn? Type75 { get; set; } + public global::DeepInfra.DeployGPUAvailability? Type75 { get; set; } /// /// /// - public global::DeepInfra.DeploymentOut? Type76 { get; set; } + public global::DeepInfra.DeployLLMIn? Type76 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type77 { get; set; } + public global::DeepInfra.DeploymentOut? Type77 { get; set; } /// /// /// - public global::DeepInfra.DeployLLMUpdateIn? Type78 { get; set; } + public global::System.Collections.Generic.IList? Type78 { get; set; } /// /// /// - public global::DeepInfra.DeployStatusOut? Type79 { get; set; } + public global::DeepInfra.DeployLLMUpdateIn? Type79 { get; set; } /// /// /// - public global::DeepInfra.DeployDelete? Type80 { get; set; } + public global::DeepInfra.DeployStatusOut? Type80 { get; set; } /// /// /// - public global::DeepInfra.DeploymentStatsOut? Type81 { get; set; } + public global::DeepInfra.DeployDelete? Type81 { get; set; } /// /// /// - public global::DeepInfra.DetailedDeploymentStatsOut? Type82 { get; set; } + public global::DeepInfra.DeploymentStatsOut? Type82 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type83 { get; set; } + public global::DeepInfra.DetailedDeploymentStatsOut? Type83 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type84 { get; set; } + public global::System.Collections.Generic.IList? Type84 { get; set; } /// /// /// - public global::DeepInfra.ModelPublicityIn? Type85 { get; set; } + public global::System.Collections.Generic.IList? Type85 { get; set; } /// /// /// - public global::DeepInfra.ModelMetaIn? Type86 { get; set; } + public global::DeepInfra.ModelPublicityIn? Type86 { get; set; } /// /// /// - public global::DeepInfra.ModelInfoOut? Type87 { get; set; } + public global::DeepInfra.ModelMetaIn? Type87 { get; set; } /// /// /// - public global::DeepInfra.SchemaOut? Type88 { get; set; } + public global::DeepInfra.ModelInfoOut? Type88 { get; set; } /// /// /// - public global::DeepInfra.OpenAICompletionsIn? Type89 { get; set; } + public global::DeepInfra.SchemaOut? Type89 { get; set; } /// /// /// - public global::DeepInfra.OpenAIChatCompletionsIn? Type90 { get; set; } + public global::DeepInfra.OpenAICompletionsIn? Type90 { get; set; } /// /// /// - public global::DeepInfra.OpenAIEmbeddingsIn? Type91 { get; set; } + public global::DeepInfra.OpenAIChatCompletionsIn? Type91 { get; set; } /// /// /// - public global::DeepInfra.OpenAIModelsOut? Type92 { get; set; } + public global::DeepInfra.OpenAIEmbeddingsIn? Type92 { get; set; } /// /// /// - public global::DeepInfra.FeedbackIn? Type93 { get; set; } + public global::DeepInfra.OpenAIModelsOut? Type93 { get; set; } /// /// /// - public global::DeepInfra.OpenAITextToSpeechIn? Type94 { get; set; } + public global::DeepInfra.FeedbackIn? Type94 { get; set; } /// /// /// - public global::DeepInfra.LogQueryOut? Type95 { get; set; } + public global::DeepInfra.OpenAITextToSpeechIn? Type95 { get; set; } /// /// /// - public global::DeepInfra.DeploymentLogQueryOut? Type96 { get; set; } + public global::DeepInfra.LogQueryOut? Type96 { get; set; } /// /// /// - public global::DeepInfra.GetVoicesOut? Type97 { get; set; } + public global::DeepInfra.DeploymentLogQueryOut? Type97 { get; set; } /// /// /// - public global::DeepInfra.Voice? Type98 { get; set; } + public global::DeepInfra.GetVoicesOut? Type98 { get; set; } /// /// /// - public global::DeepInfra.UpdateVoiceIn? Type99 { get; set; } + public global::DeepInfra.ElevenLabsTextToSpeechIn? Type99 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type100 { get; set; } + public global::DeepInfra.Voice? Type100 { get; set; } /// /// /// - public global::DeepInfra.ApiTokenIn? Type101 { get; set; } + public global::DeepInfra.UpdateVoiceIn? Type101 { get; set; } /// /// /// - public global::DeepInfra.ApiToken? Type102 { get; set; } + public global::System.Collections.Generic.IList? Type102 { get; set; } /// /// /// - public global::DeepInfra.Checklist? Type103 { get; set; } + public global::DeepInfra.ApiTokenIn? Type103 { get; set; } /// /// /// - public global::DeepInfra.ConfigOut? Type104 { get; set; } + public global::DeepInfra.ApiToken? Type104 { get; set; } /// /// /// - public global::DeepInfra.ConfigIn? Type105 { get; set; } + public global::DeepInfra.Checklist? Type105 { get; set; } /// /// /// - public global::DeepInfra.BillingPortalOut? Type106 { get; set; } + public global::DeepInfra.ConfigOut? Type106 { get; set; } /// /// /// - public global::DeepInfra.UsageOut? Type107 { get; set; } + public global::DeepInfra.ConfigIn? Type107 { get; set; } /// /// /// - public global::DeepInfra.DeepStartApplicationIn? Type108 { get; set; } + public global::DeepInfra.BillingPortalOut? Type108 { get; set; } /// /// /// - public global::DeepInfra.DeepStartApplicationOut? Type109 { get; set; } + public global::DeepInfra.UsageOut? Type109 { get; set; } + /// + /// + /// + public global::DeepInfra.DeepStartApplicationIn? Type110 { get; set; } + /// + /// + /// + public global::DeepInfra.DeepStartApplicationOut? Type111 { get; set; } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/openapi.yaml b/src/libs/DeepInfra/openapi.yaml index 0242102..089b487 100644 --- a/src/libs/DeepInfra/openapi.yaml +++ b/src/libs/DeepInfra/openapi.yaml @@ -1309,11 +1309,11 @@ paths: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [ ] - /v1/voices: + /v1/elevenlabs/v1/voices: get: summary: Get Voices description: Get available voices for a given user - operationId: get_voices_v1_voices_get + operationId: get_voices_v1_elevenlabs_v1_voices_get responses: '200': description: Successful Response @@ -1329,11 +1329,47 @@ paths: $ref: '#/components/schemas/DeepError' security: - HTTPBearer: [ ] - '/v1/voices/{voice_id}': + '/v1/elevenlabs/v1/text-to-speech/{voice_id}': + post: + summary: Text To Speech + operationId: text_to_speech_v1_elevenlabs_v1_text_to_speech__voice_id__post + parameters: + - name: voice_id + in: path + required: true + schema: + title: Voice Id + type: string + - name: x-deepinfra-source + in: header + schema: + title: X-Deepinfra-Source + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ElevenLabsTextToSpeechIn' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + security: + - HTTPBearer: [ ] + '/v1/elevenlabs/v1/voices/{voice_id}': get: summary: Get Voice description: Get a voice by its id - operationId: get_voice_v1_voices__voice_id__get + operationId: get_voice_v1_elevenlabs_v1_voices__voice_id__get parameters: - name: voice_id in: path @@ -1364,7 +1400,7 @@ paths: - HTTPBearer: [ ] delete: summary: Delete Voice - operationId: delete_voice_v1_voices__voice_id__delete + operationId: delete_voice_v1_elevenlabs_v1_voices__voice_id__delete parameters: - name: voice_id in: path @@ -1398,11 +1434,11 @@ paths: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [ ] - /v1/voices/add: + /v1/elevenlabs/v1/voices/add: post: summary: Create Voice description: Create a new voice - operationId: create_voice_v1_voices_add_post + operationId: create_voice_v1_elevenlabs_v1_voices_add_post responses: '200': description: Successful Response @@ -1418,10 +1454,10 @@ paths: $ref: '#/components/schemas/DeepError' security: - HTTPBearer: [ ] - '/v1/voices/{voice_id}/edit': + '/v1/elevenlabs/v1/voices/{voice_id}/edit': post: summary: Update Voice - operationId: update_voice_v1_voices__voice_id__edit_post + operationId: update_voice_v1_elevenlabs_v1_voices__voice_id__edit_post parameters: - name: voice_id in: path @@ -2631,6 +2667,31 @@ components: allOf: - $ref: '#/components/schemas/TimeDeploymentStatsOut' description: Time based Deployment Stats + ElevenLabsTextToSpeechIn: + title: ElevenLabsTextToSpeechIn + required: + - text + type: object + properties: + text: + title: Text + type: string + description: Text to convert to speech + example: "I'm beginnin' to feel like a Rap God, Rap God\nAll my people from the front to the back nod, back nod\nNow, who thinks their arms are long enough to slap box, slap box?\nThey said I rap like a robot, so call me Rap-bot" + model_id: + allOf: + - $ref: '#/components/schemas/TtsModel' + description: Model ID to use for the conversion + default: deepinfra/tts + output_format: + allOf: + - $ref: '#/components/schemas/TtsResponseFormat' + description: Output format for the speech + default: wav + language_code: + title: Language Code + type: string + description: 'ISO 639-1, 2 letter language code' EmailsOut: title: EmailsOut required: @@ -3659,13 +3720,6 @@ components: - input type: object properties: - webhook: - title: Webhook - maxLength: 2083 - minLength: 1 - type: string - description: 'The webhook to call when inference is done, by default you will get the output in the response of your inference request' - format: uri model: title: Model type: string @@ -3674,8 +3728,8 @@ components: input: title: Input type: string - description: text to convert to speech - example: 'Hello, how are you?' + description: Text to convert to speech + example: "I'm beginnin' to feel like a Rap God, Rap God\nAll my people from the front to the back nod, back nod\nNow, who thinks their arms are long enough to slap box, slap box?\nThey said I rap like a robot, so call me Rap-bot" voice: allOf: - $ref: '#/components/schemas/TtsVoice' @@ -3866,6 +3920,12 @@ components: title: Errors type: integer description: number of errors + TtsModel: + title: TtsModel + enum: + - deepinfra/tts + type: string + description: An enumeration. TtsResponseFormat: title: TtsResponseFormat enum: