Skip to content

Commit

Permalink
ElevenLabs-DotNet 1.3.6 (#24)
Browse files Browse the repository at this point in the history
- #23
- Added CreateVoiceRequest.Description

---------

Co-authored-by: Peter Jarrett <[email protected]>
  • Loading branch information
StephenHodgson and PeterJarrettUK authored Sep 28, 2023
1 parent 605fad8 commit 76d4407
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ElevenLabs-DotNet-Tests/Test_Fixture_05_VoiceGeneration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public async Task Test_02_GenerateVoice()
var (generatedVoiceId, audioFilePath) = await ElevenLabsClient.VoiceGenerationEndpoint.GenerateVoiceAsync(generateRequest);
Console.WriteLine(generatedVoiceId);
Console.WriteLine(audioFilePath);
var createVoiceRequest = new CreateVoiceRequest("Test Voice Lab Create Voice", generatedVoiceId);
var createVoiceRequest = new CreateVoiceRequest("Test Voice Lab Create Voice", "This is a test voice", generatedVoiceId);
File.Delete(audioFilePath);
Assert.NotNull(createVoiceRequest);
var result = await ElevenLabsClient.VoiceGenerationEndpoint.CreateVoiceAsync(createVoiceRequest);
Expand Down
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.5</Version>
<PackageReleaseNotes>Version 1.3.5
<Version>1.3.6</Version>
<PackageReleaseNotes>Version 1.3.6
- Added Voice.HighQualityBaseModelIds
- Added CreateVoiceRequest.Description
Version 1.3.5
- Updated voice settings
Version 1.3.4
- Added VoiceSettings setters for convience
Expand Down
6 changes: 5 additions & 1 deletion ElevenLabs-DotNet/VoiceGeneration/CreateVoiceRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@ namespace ElevenLabs.VoiceGeneration
{
public sealed class CreateVoiceRequest
{
public CreateVoiceRequest(string voiceName, string generatedVoiceId = null)
public CreateVoiceRequest(string voiceName, string description, string generatedVoiceId = null)
{
VoiceName = voiceName;
Description = description;
GeneratedVoiceId = generatedVoiceId;
}

[JsonInclude]
[JsonPropertyName("voice_name")]
public string VoiceName { get; }

[JsonPropertyName("voice_description")]
public string Description { get; }

[JsonInclude]
[JsonPropertyName("generated_voice_id")]
public string GeneratedVoiceId { get; }
Expand Down
5 changes: 5 additions & 0 deletions ElevenLabs-DotNet/Voices/Voice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public Voice(string id)
[JsonPropertyName("available_for_tiers")]
public IReadOnlyList<string> AvailableForTiers { get; private set; }

[JsonInclude]
[JsonPropertyName("high_quality_base_model_ids")]
public IReadOnlyList<string> HighQualityBaseModelIds { get; private set; }

[JsonInclude]
[JsonPropertyName("settings")]
public VoiceSettings Settings { get; internal set; }
Expand Down Expand Up @@ -99,6 +103,7 @@ public bool Equals(Voice other)
Equals(Labels, other.Labels) &&
PreviewUrl == other.PreviewUrl &&
Equals(AvailableForTiers, other.AvailableForTiers) &&
Equals(HighQualityBaseModelIds, other.HighQualityBaseModelIds) &&
Equals(Settings, other.Settings);
}

Expand Down

0 comments on commit 76d4407

Please sign in to comment.