cbh123 / narrator

David Attenborough narrates your life
4.33k stars 534 forks source link

A voice for the voice_id was not found #3

Open dgilperez opened 8 months ago

dgilperez commented 8 months ago

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 commented 8 months ago

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

lorelupo commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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

mattm commented 8 months ago

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

image

skorokithakis commented 8 months ago

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

julianriise commented 8 months ago

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

julianriise commented 8 months ago

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 commented 8 months ago

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

ciccarone commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

Thanks - got it working -

Does anyone know what is the David Attenborough voice?

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=.

— Reply to this email directly, view it on GitHub https://github.com/cbh123/narrator/issues/3#issuecomment-1816984696, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIVKDHL5IQXOIGTVQGNPBDYE64TZAVCNFSM6AAAAAA7M4NAY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJWHE4DINRZGY. You are receiving this because you commented.

tomcharlesosman commented 8 months ago

You have to create your own version using Instant Voice Cloning then get the ID.

Can't use the one that's loaded i don't think.

On Fri, 17 Nov 2023 at 21:20, Radu Rosu @.***> wrote:

Thanks - got it working -

Does anyone know what is the David Attenborough voice?

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=.

— Reply to this email directly, view it on GitHub < https://github.com/cbh123/narrator/issues/3#issuecomment-1816984696>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAIVKDHL5IQXOIGTVQGNPBDYE64TZAVCNFSM6AAAAAA7M4NAY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJWHE4DINRZGY>.

You are receiving this because you commented.

— Reply to this email directly, view it on GitHub https://github.com/cbh123/narrator/issues/3#issuecomment-1817049314, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE6TUT6KDNHDCOMNWKHH4IDYE7BI7AVCNFSM6AAAAAA7M4NAY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXGA2DSMZRGQ . You are receiving this because you commented.Message ID: @.***>