#How can I get the some voices in ElevenLab library?
1 messages · Page 1 of 1 (latest)
To access voices in the ElevenLabs Voice Library, follow these steps:
- Visit the Voice Library.
- Use the search bar to look for a specific voice by name or apply filters to find voices based on style, language, or other characteristics.
- Hover over the top-right corner of each voice to see how many users have added it, which can help identify trending voices.
- Click the "Sample" button to hear a short performance example of the voice.
- Once you find a voice you like, click "Add to My Voices". A pop-up will allow you to rename the voice if desired.
- The selected voice will then appear in your My Voices section, where you can use it across all ElevenLabs features.
Keep in mind that some voices in the Voice Library may not be available to free users. However, there are still many accessible options, including all Voice Designed voices and ElevenLabs Default voices.
I added voice libraries to my voices list. then I need to get the voice list added from library via api
To retrieve the voices you’ve added from the Voice Library via the API, you can use the "Get Voices" endpoint. Here's how you can do it:
-
Ensure Your API Key is Set Up: Make sure your API key is correctly configured. You can find it under "My Account" > "API Keys" on the ElevenLabs website.
-
Use the API to Fetch Voices: Below is an example Python code snippet to fetch all voices, including those added from the Voice Library:
import requests import json XI_API_KEY = "<your-api-key>" url = "https://api.elevenlabs.io/v1/voices" headers = { "Accept": "application/json", "xi-api-key": XI_API_KEY, "Content-Type": "application/json" } response = requests.get(url, headers=headers) data = response.json() for voice in data['voices']: print(f"{voice['name']}; {voice['voice_id']}")This will return a list of all voices, including default voices and those you’ve added from the Voice Library.
-
Filter for Specific Voices: If you want to include legacy voices or filter by specific criteria, you can modify the request. For example, in JavaScript:
const { ElevenLabsClient } = require("elevenlabs"); const client = new ElevenLabsClient({ apiKey: "YOUR_API_KEY" }); async function getVoices() { try { const voices = await client.voices.getAll(); console.log('Voices:', voices); return voices; } catch (error) { console.error('Error on getting voices:', error); throw error; } } getVoices();To include legacy voices:
const voices = await client.voices.getAll({ show_legacy: true }); -
Verify API Key and Account: If you encounter issues, ensure your API key is valid and linked to the correct account. You can test this by generating a short sentence using the text-to-speech endpoint and checking if it appears in your account's history.
For more details, you can refer to this guide.
It doesn't return the voices from library in community tab.
I need to get community voices
Currently, voices from the Community tab in the Voice Library cannot be retrieved directly via the API. The API only provides access to voices stored in your "Personal" tab or other custom voices you have created. Community voices added to your account are not included in the API response.
To manage community voices, you can manually add them to your "My Voices" section via the Voice Library interface. Once added, you can use them across ElevenLabs features, but they won't be accessible through the API.
For more details on managing voices, you can refer to the Voice Library guide. If you need further assistance, feel free to reach out!
I added it already My voice list. but when I call the api getAll(), it just return default voice from My Voice list. what I want to get is the voices I added from Voice Library