Create a custom voice from a recording of someone speaking
POST /Platform/tts/voices/clone
Create a custom voice from a recording of someone speaking.
Sends the recording to the provider to clone, lists the new voice in
the voice list at once (marked custom), and returns it, ready to
set on an agent. Only your organization sees it, speaks in it or sets
it on an agent or a phone menu. Requires the admin role, and the
speaker's consent: cloning a voice without the speaker's permission
is not allowed. Each clone may be billed by the provider.
Body parameters
audio_base64: str. The recording, base64-encoded (WAV or MP3, 5 to 120 seconds of clear speech by one person; 10 to 30 seconds is best).name: str. The voice's name in the voice list.provider: "cartesia" or "inworld". The provider to clone with: cartesia or inworld.speaker_name: str. Whose voice it is.consent: bool. True to confirm the speaker agreed to have their voice cloned.language: optional str. Two-letter language code of the recording (default en).description: optional str. How the voice sounds, shown in the voice list.
Returns
VoiceOption
provider: str. The voice's provider; set it as an agent'stts.provider.voice_id: str. The provider's voice id; set it astts.voice_id.name: optional str or null. The voice's display name.description: optional str or null. The provider's short description of how the voice sounds.gender: optional str or null. The voice's gender as the provider labels it; empty when the provider gives none.accent: optional str or null. The voice's accent as the provider labels it.age: optional str or null. The voice's apparent age as the provider labels it.use_cases: optional List[str]. What the provider says the voice suits, e.g. customer support.tags: optional List[str]. Words the provider uses for how the voice sounds, e.g. warm, calm.locale: optional str or null. The voice's native locale, e.g. en-US, when the provider gives one.languages: optional List[str]. Two-letter codes of the languages the voice speaks.models: optional List[str]. Models the voice can be used with; any of them is a validtts.model_id.default_model_id: optional str or null. The model to use unless you need another; set it astts.model_id.custom: optional bool. True for a voice your organization cloned (only your organization sees it).
Example request
curl -X POST "https://api.hilus.ai/Platform/tts/voices/clone" \
-H "Authorization: Bearer $HILUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'