Skip to navigation

Create Voice

Beta
View as Markdown

Beta. Creates a cloned voice from a reference audio clip in one shot. The whole pipeline runs inline: the audio is stored, validated for quality, transcribed via ASR, and cloned - the response returns the new voice_id and the auto-generated transcript (reference_text) together.

remove_background_noise defaults to true: background noise is removed from the reference audio using ML vocal extraction before the voice is saved. Pass false to keep the original clip. The response includes background_noise_removed to indicate whether denoise was actually applied.

Accepts multipart/form-data - send the audio as the file upload and everything else as form fields.

Base URL: https://api.sarvam.ai. Auth: send your key in the api-subscription-key header.

Limits: max file size 50 MB. Voice count is capped by your subscription tier (e.g. 50 voices on the starter tier, counted across your organization) - the API returns 403 TIER_LIMIT_REACHED when the cap is hit.

Billing: charged against the voice cloning API. See the pricing page.

Authentication

api-subscription-keystring
API Key authentication via header

Request

This endpoint expects a multipart form containing a file.
filefileRequired

Reference audio file used to create the cloned voice. Supported formats: WAV, MP3, FLAC, OPUS, AAC, MULAW, ALAW, LINEAR16. WAV is recommended.

Limits: max file size 50 MB. Recommended duration is 10-15 seconds, single speaker, minimal background noise.

namestringRequired1-100 characters

Display name for the cloned voice (1-100 characters).

languagestringRequired

BCP-47 language code of the reference audio (e.g. en-IN, hi-IN). The transcript is auto-generated via ASR; you do not need to pass it.

styleenum or nullOptional
Optional speaking style for the cloned voice.
Allowed values:
genderenum or nullOptional
Optional gender tag for the cloned voice.
Allowed values:
remove_background_noisebooleanOptionalDefaults to true

Remove background noise from the reference audio before saving. Uses ML-powered vocal extraction to isolate the speaker’s voice. Defaults to true. Pass false to keep the original clip.

Response

Voice created successfully. Usable immediately with POST /voices/clone.

statusstring

success

dataobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
422
Unprocessable Entity Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error
504
Gateway Timeout Error