Skip to main content
POST
Clone Voice
The sample must be at most 15 seconds of continuous, clearly audible speech, at 16-bit WAV / MP3 / M4A and a sample rate of at least 16 kHz. Mono or stereo; only the first channel is used.Two failure modes to avoid:
  • Too long. Clips over 15 seconds are rejected before the voice is created; the API surfaces this as 20004 with HTTP 400.
  • Too short or not speech. Very short clips (under roughly half a second) and clips without real speech are rejected, because the service must first transcribe the sample and a transcript is required. Aim for at least a few seconds of normal speech. This also surfaces as 20004 with HTTP 400.
Set tts_voice_id to the returned voice ID. No provider or model fields are needed for this configuration.
Error responses use the same {code, message, data} envelope; a non-zero code identifies the error.

Authorizations

Authorization
string
header
required

Your Vivix API key. Keep it on your server.

Body

application/json
name
string
required

Display name, at most 128 characters.

file_id
string
required

Audio file id in the current workspace (call Upload Audio first). At most 15 seconds of continuous clear speech.

language
string

Sample language: zh (Chinese), en (English), fr (French), de (German), ja (Japanese), ko (Korean), ru (Russian), pt (Portuguese), th (Thai), id (Indonesian), vi (Vietnamese), it (Italian), es (Spanish), ms (Malay), fil (Filipino), ar (Arabic).

Response

200 - application/json

Success

code
integer
required

0 on success; any other value is an error code.

message
string
required

success, or an English error description.

data
object
required