#Hello Hope everyone is living well Any
1 messages · Page 1 of 1 (latest)
I found this, but I don't believe it includes the Lab voices. Totally cool if it doesn't--would be a cool feature in the future
Use this code to get all the voices:
import requests
import json
XI_API_KEY = "<xi-api-key>"
url = "https://api.elevenlabs.io/v1/voices"
headers = {
"Accept": "application/json",
"xi-api-key": XI_API_KEY
}
response = requests.get(url, headers=headers)
# Parse the JSON response
data = response.json()
# Loop through each voice in the response
for voice in data['voices']:
# Print the 'name' and 'voice_id' in the required format
print(f"{voice['name']}; {voice['voice_id']}")
Replace <xi-api-key> with your actual API key and you should get a list of all the voices in your account and the voice_id
Beast! Code worked 🙏
Glad to hear it! It is not the same. This is your unique voice_id I belive. Since the voice is copied into your library, it also gets its own id.
Ah, that makes sense, appreciate the time