diff --git a/ElevenLabs-DotNet/ElevenLabs-DotNet.csproj b/ElevenLabs-DotNet/ElevenLabs-DotNet.csproj index 075ab70..36ca6d8 100644 --- a/ElevenLabs-DotNet/ElevenLabs-DotNet.csproj +++ b/ElevenLabs-DotNet/ElevenLabs-DotNet.csproj @@ -32,6 +32,8 @@ Version 3.5.0 - Added seed property - Added applyTextNormalization property - Removed deprecated optimizeStreamingLatency property +- Added VoiceSettings.ctr overload + - Added speed property Version 3.4.2 - Added flash models - Added stream input support to dubbing endpoint diff --git a/ElevenLabs-DotNet/Voices/VoiceSettings.cs b/ElevenLabs-DotNet/Voices/VoiceSettings.cs index 8c9ce9a..6492080 100644 --- a/ElevenLabs-DotNet/Voices/VoiceSettings.cs +++ b/ElevenLabs-DotNet/Voices/VoiceSettings.cs @@ -1,22 +1,35 @@ // Licensed under the MIT License. See LICENSE in the project root for license information. +using System; using System.Text.Json.Serialization; namespace ElevenLabs.Voices { public sealed class VoiceSettings { - [JsonConstructor] + [Obsolete("use new .ctr overload")] public VoiceSettings( float stability = .75f, float similarityBoost = .75f, bool speakerBoost = true, float style = 0.45f) + : this(stability, similarityBoost, style, speakerBoost) + { + } + + [JsonConstructor] + public VoiceSettings( + float stability = .75f, + float similarityBoost = .75f, + float style = 0.45f, + bool speakerBoost = true, + float speed = 1f) { Stability = stability; SimilarityBoost = similarityBoost; Style = style; SpeakerBoost = speakerBoost; + Speed = speed; } [JsonPropertyName("stability")] @@ -30,5 +43,8 @@ public VoiceSettings( [JsonPropertyName("use_speaker_boost")] public bool SpeakerBoost { get; set; } + + [JsonPropertyName("speed")] + public float Speed { get; set; } } }