Closed yunusdemir closed 1 year ago
I get the same thing (about 11 seconds). Using the API directly (Curl) to get the voices list is fine.
Hi @yunusdemir! This has been fixed in v0.2.25
, the settings are not fetched by default anymore. You can call voice.fetch_settings()
on the desired voice to individually fetch settings
Awesome, thanks for the update @flavioschneider!
The observation
When a user is getting the list of voices, either via
voices()
insimple.py
orVoices.from_api()
, the load time gets longer the more voices users have in their accounts.The findings
We currently have 19 voices in our account and the loading time of
voices()
is about 31 seconds. After investigating, this is caused bycomputed_settings
method on theVoice
class. The method does a request perVoice
instance to the ElevenLabs servers to get theVoiceSettings
because there are no settings given in the get voices route via the ElevenLabs API ("settings":null
).The problem lies in lines 133-136 of
api/voice.py
:It returns
VoiceSettings
if given, but since there are no settings given in the API, they are not passed and the method will get them one by one via the API, which is slow.Proposed solutions
VoiceSettings
when getting a list of the voices. This would be sufficient for our uses.→ Something I'd be able to create a PR for
VoiceSettings
in the ElevenLabs API. → Needs your help