Voice cloning with models lab API

HI everyone! I need some help, please!

I’m using an API to let user clone their voice.
They first need to upload an audio file (URL) and choose a name for this voice.
The problem is that in case the name is already taken, the API call returns an error.

For example, if one person uploads an audio with “John” as the name of that voice, nobody else is going to be able to call their voice “John” too. This is a big problem, cause users will need to choose names that are not already taken (it will make no sense to them)

The question is, how can I add a different value to these voices’ names without the user having to do anything at all. I mean there can be 3 different people calling their voice “John” and the API call will be working anyway.

Thanks in advance! This forum is so helpful ! (I do not have anybody in real life who can help me out)

Create a thing (voice) for each new voice.

Send the unique id of the voice as the “name” to the API.

Note:
If you don’t like the idea of sending a random id as “name” to the API, you can Set a Slug for each new voice and send the slug to the API instead of the unique id.

Slugs are always unique values and you can generate them based on the real name that the user selected for the voice.

1 Like