Skip to content

Commit

Permalink
ElevenLabs-DotNet 1.3.4 (#18)
Browse files Browse the repository at this point in the history
- Added VoiceSettings setters for convience
- Added voice validation in tts endpoint
  • Loading branch information
StephenHodgson authored May 29, 2023
1 parent fe699e9 commit 9158c5a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 5 additions & 2 deletions ElevenLabs-DotNet/ElevenLabs-DotNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
<Company>RageAgainstThePixel</Company>
<Copyright>2023</Copyright>
<PackageTags>ElevenLabs, AI, ML, Voice, TTS</PackageTags>
<Version>1.3.3</Version>
<PackageReleaseNotes>Version 1.3.3
<Version>1.3.4</Version>
<PackageReleaseNotes>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
Expand Down
3 changes: 2 additions & 1 deletion ElevenLabs-DotNet/TextToSpeech/TextToSpeechEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public async Task<string> 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));
}
Expand Down
4 changes: 2 additions & 2 deletions ElevenLabs-DotNet/Voices/VoiceSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
}

0 comments on commit 9158c5a

Please sign in to comment.