v1

latestOpenAPI 3.1.02026-07-13212942.9 KB
Synth Voices

Voice Clone

Clone a voice from an uploaded audio prompt.

Runs the clone pipeline concurrently for each requested ai_model_versions entry using asyncio.TaskGroup. Partial failures are tolerated — a voice record is persisted in the database even if some model versions fail, as long as at least one succeeds. The original audio is uploaded to GCS in parallel with the clone jobs.

Super-user-only fields (voice_id, prompt_chunk_duration, preset_quality != 3, voice_details_id, and voice_type=PREDEFINED) raise AccessDenied for non-super-user tokens.

Args: audio: Prompt audio file (validated for format and size). token: Authenticated token with user context. version: API version extracted from the version request header. name: Display name for the new voice. description: Optional description. enhance: Whether to apply audio enhancement before cloning. transcript: Optional transcript of the prompt audio. style: Voice style tag. gender: Speaker gender. accent: Speaker accent tag. voice_type: CUSTOM (default) or PREDEFINED (super-user only). preset_quality: Clone quality level (super-user only to change from default 3). voice_details_id: Optional link to an existing voice details record (super-user only). prompt_chunk_duration: Override for prompt chunk duration after preprocessing (super-user only; deprecated in non-local/dev environments). voice_id: Explicit UUID to assign to the new voice (super-user only). ai_model_versions: Model versions to run the clone pipeline for. ai_voice_service: Voice metadata service. google_storage: GCS client for audio upload. prompt_language: Force the language of the prompt audio instead of auto-detecting.

Returns: CloneVoiceResponse: ID, name, description, and detected language of the new voice.

Raises: AccessDenied: When a non-super-user supplies restricted fields. VoiceCloneLimitExceeded: When the user has reached the voice-clone cap. FileTooLargeException: When the uploaded audio exceeds the configured size limit. Exception: Re-raises the primary model-version error when all clone jobs fail.

post/voices/clone

Query parameters

voice_details_idstring uuid nullable

Headers

version'v1'
X-Api-Keystring

Response

Successful Response

namestring required
descriptionstring required
languagestring required