Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A voice for the voice_id was not found #3

Open
dgilperez opened this issue Nov 15, 2023 · 25 comments
Open

A voice for the voice_id was not found #3

dgilperez opened this issue Nov 15, 2023 · 25 comments

Comments

@dgilperez
Copy link

Hi! Thanks for hacking this one, it's super cool :)

Narrator doesn't work for me, the elevenpath API always returns

elevenlabs.api.error.APIError: A voice for the voice_id XXX was not found.

where XXX is the voiceId of my freshly created voice.

any ideas? I can't find the error in their docs

@dgilperez
Copy link
Author

Ok, found it - docs say to set ELEVENLABS_API_TOKEN, but the library expects ELEVEN_API_KEY.

@lorelupo
Copy link

I am actually getting this error even when setting export ELEVEN_API_KEY=<mykey>. It looks like the problem is the voice="ENfvYmv6CRqDodDZTieQ" argument of the play_audio() function

@lorelupo
Copy link

lorelupo commented Nov 15, 2023

Found the solution: you should go to elevenlabs.io/voice-library and add the voice of "Brian" to your VoiceLab. Then change line audio = generate(text=text, voice="ENfvYmv6CRqDodDZTieQ", model="eleven_turbo_v2") with audio = generate(text=text, voice="Brian", model="eleven_turbo_v2")

@mattm
Copy link
Contributor

mattm commented Nov 15, 2023

If you add Brian's voice but see this error:

ValueError: Voice 'Brian' not found.

It's because of #4: make sure you're setting ELEVEN_API_KEY, not ELEVENLABS_API_TOKEN like it currently says in the readme.

@andrepcg
Copy link

Nope, still doesn't work for me. I also have a paid sub. That voice ID is just missing

@mattm
Copy link
Contributor

mattm commented Nov 15, 2023

I'm on a free account. Here's what I see (and it's working):

image

@skorokithakis
Copy link

Brian doesn't sound like David Attenborough, though, but in the video he really does. Does anyone know the actual voice?

@julianriise
Copy link

I got Brian to work, but how do we get Attenburough?

@julianriise
Copy link

I solved it, you need to buy a subscription with Elevenlabs $5/month, and create a new voice in voice lab using the "Instant voice clone" option. Upload a mp3 file of Attenbouroughs voice from this link: https://www.mediafire.com/file/rkzphfpyzisjrrq/david.mp3/file, name it something like "David", and reference "David" from your narrator.py file like so:

def play_audio(text):
    audio = generate(
        text=text, 
        voice="David", 
        model="eleven_turbo_v2"
        )

@Chris-Brauns-II
Copy link

I used "David - Gentle, Engaging, Soothing" from the existing Voice Library, and it worked pretty well!

@ciccarone
Copy link

Ah exactly what I was looking for

Very cool, I got it working and wow what a gem of how this technology can/will be used

@Althea-Texas
Copy link

Hi! I've almost got this working, but I'm getting this error message "This request's text has 590 characters and exceeds the character limit of 2500 characters for non signed in accounts." I'm currently subscribed to the Starter Account and have tried resetting my API key multiple times. I'm sooooo close. Any ideas?

@bogy0
Copy link

bogy0 commented Nov 15, 2023

I had the same issue @Althea-Texas, i am also on the Starter plan. Try to logout/login and regenerate your API key, then update your env variable ELEVEN_API_KEY and re-run narrator.py

@greysonn
Copy link

I had the same issue @Althea-Texas, i am also on the Starter plan. Try to logout/login and regenerate your API key, then update your env variable ELEVEN_API_KEY and re-run narrator.py

Hi! I've almost got this working, but I'm getting this error message "This request's text has 590 characters and exceeds the character limit of 2500 characters for non signed in accounts." I'm currently subscribed to the Starter Account and have tried resetting my API key multiple times. I'm sooooo close. Any ideas?

I was able to fix by importing set_api_key from eleven and calling it with
set_api_key("mykey")
at the top of the file

@LukeAbell
Copy link

Is the "Instant Voice Cloning" option grayed out for anyone else? Just upgraded to the starter plan.

Might be the firestore issue mentioned in the banner when logging in?

@Althea-Texas
Copy link

I had the same issue @Althea-Texas, i am also on the Starter plan. Try to logout/login and regenerate your API key, then update your env variable ELEVEN_API_KEY and re-run narrator.py

Thank you, everyone. This worked! :)

@VellalaVineethKumar
Copy link

Hi @Althea-Texas ,
can you please give an example of "export ELEVENLABS_API_KEY="?

Do you know if this is how it looks?
" https://elevenlabs.io/voice-lab/share/d04d44725c0d27dec405f110774d9520d77074476311f13c386e1dc697eeb9db/QSMJueLrQxJFcclM3UoA "

@julianriise
Copy link

Is the "Instant Voice Cloning" option grayed out for anyone else? Just upgraded to the starter plan.

I had the same issue. Seems like an issue with Elevenlabs, I solved it by signing up with a fresh email and subscribing to the starter plan.

@julianriise
Copy link

Hi @Althea-Texas , can you please give an example of "export ELEVENLABS_API_KEY="?

Do you know if this is how it looks? " https://elevenlabs.io/voice-lab/share/d04d44725c0d27dec405f110774d9520d77074476311f13c386e1dc697eeb9db/QSMJueLrQxJFcclM3UoA "

You can set the API key with this command (replace with an actual API key, this is just a random string).

export ELEVEN_API_KEY="29ab7HgdklkHHfs9902jwklsjHHklk"

You can also check that the API was actually set with this command:

echo $ELEVEN_API_KEY

@tomcharlesosman
Copy link

If you add Brian's voice but see this error:

ValueError: Voice 'Brian' not found.

It's because of #4: make sure you're setting ELEVEN_API_KEY, not ELEVENLABS_API_TOKEN like it currently says in the readme.

thanks for this!

@radurosu
Copy link

Hi - Without edits am getting the below error -
If I replace voice="ENfvYmv6CRqDodDZTieQ" with voice voice="Brian" I get
File "/....../.pyenv/versions/3.10.10/lib/python3.10/site-packages/elevenlabs/simple.py", line 56, in generate
raise ValueError(f"Voice '{voice_str}' not found.")
ValueError: Voice 'Brian' not found.

Any idea as to why?
Should not the David A voice be somewhere public?

🎙️ David says:
Ah, here we observe the Homo sapiens in its natural habitat, engaging in the timeless ritual of deep contemplation. Note the furrowed brow, the glasses perched precariously, and the lone finger poised thoughtfully upon the chin—these are the hallmarks of a mind whirring at peak efficiency. Or perhaps, it's simply trying to remember if it left the kettle on. Truly, a magnificent spectacle of human cognitive prowess. Or maybe just an itchy chin. Isn't nature enthralling?
Traceback (most recent call last):
File "/...../dev/david/venv/narrator.py", line 101, in
main()
File "/...../dev/david/venv/narrator.py", line 92, in main
play_audio(analysis)
File "/...../dev/david/venv/narrator.py", line 27, in play_audio
audio = generate(text=text, voice="ENfvYmv6CRqDodDZTieQ", model="eleven_turbo_v2")

@lorelupo
Copy link

lorelupo commented Nov 17, 2023

Hi - Without edits am getting the below error - If I replace voice="ENfvYmv6CRqDodDZTieQ" with voice voice="Brian" I get File "/....../.pyenv/versions/3.10.10/lib/python3.10/site-packages/elevenlabs/simple.py", line 56, in generate raise ValueError(f"Voice '{voice_str}' not found.") ValueError: Voice 'Brian' not found.

Any idea as to why? Should not the David A voice be somewhere public?

From your error, it looks like you haven't replaced the voice name with Brian:

File "/...../dev/david/venv/narrator.py", line 27, in play_audio
audio = generate(text=text, voice="ENfvYmv6CRqDodDZTieQ", model="eleven_turbo_v2")

If you did replace it and still get that error, you probably haven't navigated to elevenlabs.io/voice-library and added the voice of Brian (or whatever other voice you wish to use) to your VoiceLab.

@KoenVdH
Copy link

KoenVdH commented Nov 17, 2023

Found why I always got 'voice_id was not found'.
In the readme is written export ELEVENLABS_API_KEY=
but this should be export ELEVEN_API_KEY=.

@radurosu
Copy link

radurosu commented Nov 17, 2023 via email

@tomcharlesosman
Copy link

tomcharlesosman commented Nov 17, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.