[Python] Cannot access elevenlabs voice using the API

Discussão em 'Python' iniciado por Stack, Abril 7, 2025.

  1. Stack

    Stack Membro Participativo

    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:

    [​IMG]

    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.

    Continue reading...

Compartilhe esta Página