OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Cannot access elevenlabs voice using the API

  • Thread starter Thread starter Giacomo
  • Start date Start date
G

Giacomo

Guest
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

Code:
pip install elevenlabs==0.3.0b0
  1. I instantiated the client

Code:
from elevenlabs.client import ElevenLabs

client = ElevenLabs(api_key="...")
  1. I have built a voice object with custom settings to personalize the voice style

Code:
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:

Code:
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.
<p>I want to use the voice "Ryan Kurk" (voice ID: <code>rU18Fk3uSDhmg5Xh41o4</code>) 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.</p>
<p>Getting voice ID from elevenlabs:</p>
<p><img src="https://i.sstatic.net/zmG7Q.png" alt="Getting voice ID from elevenlabs" /></p>
<p>I have followed the <a href="https://github.com/elevenlabs/elevenlabs-python" rel="nofollow noreferrer">github tutorial</a> to use the elevenlabs python API and</p>
<ol>
<li>I installed the library</li>
</ol>
<pre><code>pip install elevenlabs==0.3.0b0
</code></pre>
<ol start="2">
<li>I instantiated the client</li>
</ol>
<pre><code>from elevenlabs.client import ElevenLabs

client = ElevenLabs(api_key="...")
</code></pre>
<ol start="3">
<li>I have built a voice object with custom settings to personalize the voice style</li>
</ol>
<pre><code>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)
</code></pre>
<p>where <code>voice_id=rU18Fk3uSDhmg5Xh41o4</code>. I get the following error:</p>
<pre><code>ApiError: status_code: 400, body: {'detail': {'status': 'voice_not_found', 'message': 'A voice for the voice_id rU18Fk3uSDhmg5Xh41o4 was not found.'}}
</code></pre>
<p>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.</p>
 

Latest posts

Top