ElevenLabs-DotNet
1.0.3
See the version list below for details.
dotnet add package ElevenLabs-DotNet --version 1.0.3
NuGet\Install-Package ElevenLabs-DotNet -Version 1.0.3
<PackageReference Include="ElevenLabs-DotNet" Version="1.0.3" />
paket add ElevenLabs-DotNet --version 1.0.3
#r "nuget: ElevenLabs-DotNet, 1.0.3"
// Install ElevenLabs-DotNet as a Cake Addin #addin nuget:?package=ElevenLabs-DotNet&version=1.0.3 // Install ElevenLabs-DotNet as a Cake Tool #tool nuget:?package=ElevenLabs-DotNet&version=1.0.3
ElevenLabs-DotNet
A non-official Eleven Labs voice synthesis RESTful client.
I am not affiliated with Eleven Labs and an account with api access is required.
All copyrights, trademarks, logos, and assets are the property of their respective owners.
Getting started
Install from NuGet
Install package ElevenLabs
from Nuget. Here's how via command line:
Install-Package ElevenLabs-DotNet
Looking to use ElevenLabs in the Unity Game Engine? Check out our unity package on OpenUPM:
Documentation
Table of Contents
Text to Speech
Convert text to speech.
var api = new ElevenLabsClient();
var text = "The quick brown fox jumps over the lazy dog.";
var voice = (await api.VoicesEndpoint.GetAllVoicesAsync()).FirstOrDefault();
var defaultVoiceSettings = await api.VoicesEndpoint.GetDefaultVoiceSettingsAsync();
var clipPath = await api.TextToSpeechEndpoint.TextToSpeechAsync(text, voice, defaultVoiceSettings);
Console.WriteLine(clipPath);
Voices
Access to voices created either by the user or ElevenLabs.
Get All Voices
Gets a list of all available voices.
var api = new ElevenLabsClient();
var allVoices = await api.VoicesEndpoint.GetAllVoicesAsync();
foreach (var voice in allVoices)
{
Console.WriteLine($"{voice.Id} | {voice.Name} | similarity boost: {voice.Settings?.SimilarityBoost} | stability: {voice.Settings?.Stability}");
}
Get Default Voice Settings
Gets the global default voice settings.
var api = new ElevenLabsClient();
var result = await api.VoicesEndpoint.GetDefaultVoiceSettingsAsync();
Console.WriteLine($"stability: {result.Stability} | similarity boost: {result.SimilarityBoost}");
Get Voice
var api = new ElevenLabsClient();
var voice = await api.VoicesEndpoint.GetVoiceAsync("voiceId");
Console.WriteLine($"{voice.Id} | {voice.Name} | {voice.PreviewUrl}");
Edit Voice Settings
Edit the settings for a specific voice.
var api = new ElevenLabsClient();
var success = await api.VoicesEndpoint.EditVoiceSettingsAsync(voice, new VoiceSettings(0.7f, 0.7f));
Console.WriteLine($"Was successful? {success}");
Add Voice
var api = new ElevenLabsClient();
var labels = new Dictionary<string, string>
{
{ "accent", "american" }
};
var audioSamplePaths = new List<string>();
var voice = await api.VoicesEndpoint.AddVoiceAsync("Voice Name", audioSamplePaths, labels);
Edit Voice
var api = new ElevenLabsClient();
var labels = new Dictionary<string, string>
{
{ "age", "young" }
};
var audioSamplePaths = new List<string>();
var success = await api.VoicesEndpoint.EditVoiceAsync(voice, audioSamplePaths, labels);
Console.WriteLine($"Was successful? {success}");
Delete Voice
var api = new ElevenLabsClient();
var success = await api.VoicesEndpoint.DeleteVoiceAsync(voiceId);
Console.WriteLine($"Was successful? {success}");
Samples
Access to your samples, created by you when cloning voices.
Get Voice Sample
var api = new ElevenLabsClient();
var clipPath = await api.VoicesEndpoint.GetVoiceSampleAsync(voiceId, sampleId);
Console.WriteLine(clipPath);
Delete Voice Sample
var api = new ElevenLabsClient();
var success = await api.VoicesEndpoint.DeleteVoiceSampleAsync(voiceId, sampleId);
Console.WriteLine($"Was successful? {success}");
History
Access to your previously synthesized audio clips including its metadata.
Get History
var api = new ElevenLabsClient();
var historyItems = await api.HistoryEndpoint.GetHistoryAsync();
foreach (var historyItem in historyItems.OrderBy(historyItem => historyItem.Date))
{
Console.WriteLine($"{historyItem.State} {historyItem.Date} | {historyItem.Id} | {historyItem.Text.Length} | {historyItem.Text}");
}
Get History Audio
var api = new ElevenLabsClient();
var clipPath = await api.HistoryEndpoint.GetHistoryAudioAsync(historyItem);
Console.WriteLine(clipPath);
Download All History
var api = new ElevenLabsClient();
var success = await api.HistoryEndpoint.DownloadHistoryItemsAsync();
Delete History Item
var api = new ElevenLabsClient();
var result = await api.HistoryEndpoint.DeleteHistoryItemAsync(historyItem);
Console.WriteLine($"Was successful? {success}");
User
Access to your user Information and subscription status.
Get User Info
Gets information about your user account with ElevenLabs.
var api = new ElevenLabsClient();
var userInfo = await api.UserEndpoint.GetUserInfoAsync();
Get Subscription Info
Gets information about your subscription with ElevenLabs.
var api = new ElevenLabsClient();
var subscriptionInfo = await api.UserEndpoint.GetSubscriptionInfoAsync();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on ElevenLabs-DotNet:
Package | Downloads |
---|---|
FrostAura.Libraries.Intelligence.Semantic.Core
FrostAura Semantic Core provides structures and utilities to build language and hybrid applications. |
|
ElevenLabs-DotNet-Proxy
A simple Proxy API gateway for ElevenLabs-DotNet to make authenticated requests from a front end application without exposing your API keys. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.4.1 | 0 | 11/25/2024 |
3.4.0 | 20 | 11/25/2024 |
3.1.0 | 3,396 | 9/14/2024 |
3.0.3 | 107 | 9/14/2024 |
3.0.2 | 367 | 9/3/2024 |
3.0.1 | 92 | 9/2/2024 |
3.0.0 | 228 | 9/2/2024 |
2.2.1 | 19,265 | 5/9/2024 |
2.2.0 | 189 | 5/6/2024 |
2.1.1 | 3,183 | 2/15/2024 |
2.1.0 | 2,248 | 11/29/2023 |
2.0.3 | 844 | 11/15/2023 |
2.0.2 | 164 | 11/14/2023 |
2.0.1 | 130 | 11/11/2023 |
2.0.0 | 259 | 10/29/2023 |
1.3.6 | 1,859 | 9/28/2023 |
1.3.5 | 1,396 | 7/14/2023 |
1.3.4 | 1,730 | 5/29/2023 |
1.3.3 | 559 | 5/21/2023 |
1.3.2 | 418 | 5/12/2023 |
1.3.0 | 208 | 5/1/2023 |
1.2.1 | 170 | 4/30/2023 |
1.2.0 | 165 | 4/30/2023 |
1.1.1 | 376 | 3/26/2023 |
1.1.0 | 204 | 3/26/2023 |
1.0.4 | 235 | 3/24/2023 |
1.0.3 | 238 | 3/13/2023 |
1.0.2 | 214 | 3/12/2023 |
1.0.1 | 224 | 3/11/2023 |
1.0.0 | 249 | 3/11/2023 |
Release 1.0.3
- Updated DownloadHistoryItemsAsync to download all items if no ids are specified
- Updated docs
Release 1.0.2
- Added VoiceGenerationEndpoint
- Added unit tests for voice design and instant voice cloning
- Updated docs
Release 1.0.1
- Updated docs
Release 1.0.0
- Initial Release!