elevenlabs / elevenlabs-python

The official Python API for ElevenLabs Text to Speech.
https://elevenlabs.io/docs/api-reference/getting-started
MIT License
2.2k stars 255 forks source link

Legacy voices #325

Closed HamletEagle closed 3 months ago

HamletEagle commented 3 months ago

Hello,

Is it possible to continue using legacy voices from the Python API? For example, I was using "Josh", but I noticed it is no longer available in the API. client.voices.get_all() doesn't return it anymore.

I looked on the website and saw that the name got changed to "Josh (Legacy)", so I tried adding "(Legacy)" in the Python API without any success.

Thanks!

ahmedebid commented 3 months ago

@HamletEagle I don't use the Python API but I see in the docs that ElevenLabs now have this new prop called show_legacy which defaults to false. So, probably you can pass that somewhere to get the legacy voices

HamletEagle commented 3 months ago

Thank you! Here is how it can be done in the python API:

from elevenlabs.core import RequestOptions
request_options = RequestOptions(additional_query_parameters={"show_legacy": "true"})
audio = client.generate(text="Hello, World!", voice='Josh', model="eleven_multilingual_v2", request_options=request_options)
dsinghvi commented 3 months ago

@HamletEagle thanks for commenting the solution! we are going to be regenerating the SDK with this flag today

dsinghvi commented 3 months ago

@HamletEagle @ahmedebid this is released as part of v1.6.0rc0, please let us now if you have any issues