Cannot access elevenlabs voice using the API

299 Views Asked by At

I want to use the voice "Ryan Kurk" (voice ID: rU18Fk3uSDhmg5Xh41o4) from elevenlabs in a project using the API but for some reason the API says that the voice is unavailable. Its ID can be obtained by hovering over the ID on the site.

Getting voice ID from elevenlabs:

Getting voice ID from elevenlabs

I have followed the github tutorial to use the elevenlabs python API and

  1. I installed the library
pip install elevenlabs==0.3.0b0
  1. I instantiated the client
from elevenlabs.client import ElevenLabs

client = ElevenLabs(api_key="...")
  1. I have built a voice object with custom settings to personalize the voice style
from elevenlabs import Voice, VoiceSettings, generate

audio = generate(
    text="Hello! My name is Bella.",
    voice=Voice(
        voice_id=voice_id,
        settings=VoiceSettings(stability=0.71, similarity_boost=0.5, style=0.0, use_speaker_boost=True)
    )
)

play(audio)

where voice_id=rU18Fk3uSDhmg5Xh41o4. I get the following error:

ApiError: status_code: 400, body: {'detail': {'status': 'voice_not_found', 'message': 'A voice for the voice_id rU18Fk3uSDhmg5Xh41o4 was not found.'}}

And I cannot figure out why the API does not recognize that voice ID even though I can use that voice in the elevenlabs 'Speech Synthesis' page.

1

There are 1 best solutions below

0
Karan Jain On

I think you're trying to access a Voice Library voice id. To do that, you need to add that Voice to your Voice Lab and it should work after that.