diff --git a/ElevenLabs-DotNet/ElevenLabs-DotNet.csproj b/ElevenLabs-DotNet/ElevenLabs-DotNet.csproj index b567dc1..ac78a03 100644 --- a/ElevenLabs-DotNet/ElevenLabs-DotNet.csproj +++ b/ElevenLabs-DotNet/ElevenLabs-DotNet.csproj @@ -14,8 +14,11 @@ RageAgainstThePixel 2023 ElevenLabs, AI, ML, Voice, TTS - 1.3.3 - Version 1.3.3 + 1.3.4 + Version 1.3.4 +- Added VoiceSettings setters for convience +- Added voice validation in tts endpoint +Version 1.3.3 - Assign default voice names - Get voice details if missing in tts Version 1.3.2 diff --git a/ElevenLabs-DotNet/TextToSpeech/TextToSpeechEndpoint.cs b/ElevenLabs-DotNet/TextToSpeech/TextToSpeechEndpoint.cs index 1ad1e8b..6eda001 100644 --- a/ElevenLabs-DotNet/TextToSpeech/TextToSpeechEndpoint.cs +++ b/ElevenLabs-DotNet/TextToSpeech/TextToSpeechEndpoint.cs @@ -39,7 +39,8 @@ public async Task TextToSpeechAsync(string text, Voice voice, VoiceSetti throw new ArgumentOutOfRangeException(nameof(text), $"{nameof(text)} cannot exceed 5000 characters"); } - if (voice == null) + if (voice == null || + string.IsNullOrWhiteSpace(voice.Id)) { throw new ArgumentNullException(nameof(voice)); } diff --git a/ElevenLabs-DotNet/Voices/VoiceSettings.cs b/ElevenLabs-DotNet/Voices/VoiceSettings.cs index bc5cfbe..365e483 100644 --- a/ElevenLabs-DotNet/Voices/VoiceSettings.cs +++ b/ElevenLabs-DotNet/Voices/VoiceSettings.cs @@ -14,9 +14,9 @@ public VoiceSettings(float stability, float similarityBoost) } [JsonPropertyName("stability")] - public float Stability { get; } + public float Stability { get; set; } [JsonPropertyName("similarity_boost")] - public float SimilarityBoost { get; } + public float SimilarityBoost { get; set; } } }