#I created a custom voice, copied the ID, and getting an error that the voice_ID was not found. Veri

1 messages · Page 1 of 1 (latest)

bronze archBOT
#
AI-generated Answer for brandoncharleson

Yes, your custom cloned voices should be accessible to generate Text-to-Speech (TTS) via the API. However, you need to ensure that you're using the correct voice_id for the voice you want to use.

The easiest way to obtain the voice_id of individual voices is to hover over the icon next to the voice name in the VoiceLab. If you click that icon, it will copy the voice_id to your clipboard, and you can then paste it into your code directly.

If you want to fetch all the voices in your library via the API, you can use the following Python code:

# The 'requests' and 'json' libraries are imported.
import requests
import json

# An API key is defined here.
XI_API_KEY = "<xi-api-key>"

# This is the URL for the API endpoint we'll be making a GET request to.
url = "https://api.elevenlabs.io/v1/voices"

# Here, headers for the HTTP request are being set up.
headers = {
  "Accept": "application/json",
  "xi-api-key": XI_API_KEY,
  "Content-Type": "application/json"
}

# A GET request is sent to the API endpoint. The URL and the headers are passed into the request.
response = requests.get(url, headers=headers)

# The JSON response from the API is parsed.
data = response.json()

# A loop is created to iterate over each 'voice' in the 'voices' list from the parsed data.
for voice in data['voices']:
  # For each 'voice', the 'name' and 'voice_id' are printed out.
  print(f"{voice['name']}; {voice['voice_id']}")

If you provide the API key then the endpoint will return both the premade voices and the voices you added. If you do not receive the expected voices, you will either encounter an error or just see the pre-made voices, which is most likely indicating that you are not passing your API key correctly.

If you're still encountering issues, it might be best to reach out to the support team for further assistance.

desert basalt
#

I've recreated my API key and still seeing the same result of all the premade voices and not custom.

bronze archBOT
#
AI-generated Answer for brandoncharleson

Based on the information provided, it seems that you should be able to access your custom cloned voices via the API. The voices in your VoiceLab, including those generated using Voice Design and Professional Voice Clones, are only accessible through your account unless you explicitly share them.

However, there are some restrictions. For instance, if you downgrade your tier, you can only have as many cloned voices saved as your tier allows you to. If you created more cloned voices than your tier allows, you will only have access to the excess voices if you upgrade again.

If you're still having trouble, it might be a technical issue that's not covered in the provided content. It would be best to reach out to the support team for further assistance.

desert basalt
#

I'm on the Creator plan. I don't see the voices listed using the GET voices request and still not able to generate with the ID on the end of the correct end point

bronze archBOT
#
AI-generated Answer for brandoncharleson

Based on the information provided, it seems that you should have access to your custom voices via the API as a Creator plan user. However, the content does not provide specific troubleshooting steps for the issue you're experiencing.

It's mentioned that unless you explicitly share a voice with another account or to the Voice Library, the voices in your VoiceLab are only accessible through your account. If you're still having trouble, it might be a technical issue that needs to be addressed by the support team of the service you're using.

I recommend reaching out to the support team for further assistance. They should be able to help you troubleshoot the issue and ensure that your custom voices are accessible via the API.

desert basalt
#

Is the support team on this discord?

bronze archBOT
#
AI-generated Answer for brandoncharleson

Yes, the ElevenLabs community is available on Discord. You can join the Discord channel to get help and assistance from the team members and other users at any time. This is especially recommended if you have API questions or just want to hang out. You can join the Discord channel by following this link.

tidal needle
# desert basalt Is the support team on this discord?

Hello, were you able to figure this out? This #🤖│ask-ai channel is mainly just used for quick answers from the AI bot so support tends to check the AI threads frequently.

When the GET /v1/voices endpoint only returns premade and you can generate using the voice ID of custom voices, almost certainly your API key is not being passed correctly. The API will still function in sort of a trial mode for awhile when it does not receive an API key (or it isn't sent correctly). Make sure you include it in the headers as "xi-api-key", sometimes users might mistakenly use underscores "xi_api_key" or similar that won't work or if you ask GPT to help you write code it usually proves a bearer authentication scheme which doesn't apply to ElevenLabs (it isn't familiar with the ElevenLabs API).