CreateCustomVoice
Clone a custom voice from a recorded or uploaded audio sample of 15–30 seconds, sent as a multipart file part whose own Content-Type is the audio’s MIME type (audio/mpeg, audio/mp3, audio/wav, audio/x-wav, audio/mp4, audio/m4a, audio/x-m4a, audio/ogg, audio/webm, audio/aac or audio/flac). The file may be at most 25 MiB; a request body over 26 MiB is refused with a bare 413.
When the sample raises soft warnings, the call returns 200 with a null voice and the warnings; re-submit the same audio with ignoreSoftWarnings = true to clone anyway.
Pass a clientRequestId: one GUID per recording, reused for the re-submit and for any retry. A token that already produced a voice returns that voice, because a clone can outlive the caller’s timeout.
Errors
- 400
VOICE_AUDIO_MISSING,VOICE_AUDIO_TOO_LARGE,VOICE_AUDIO_UNSUPPORTED,VOICE_AUDIO_DURATION_OUT_OF_RANGE,VOICE_AUDIO_UNINTELLIGIBLEorCLIENT_REQUEST_ID_CONFLICT: change the request. - 403
NO_ACTIVE_SUBSCRIPTIONorVOICE_NOTES_NOT_ENABLED. - 404
CUSTOM_VOICE_NOT_FOUND: the voice was deleted while it was being created. - 502
VOICE_PROVIDER_UNAVAILABLE, and 503VOICE_ENGINE_BUSY,VOICE_TRANSCRIPTION_UNAVAILABLEorVOICE_AUDIO_PROCESSING_UNAVAILABLE: transient, so retry with the sameclientRequestId.
Headers
API key header using this scheme. Example: “X-API-KEY: {API_KEY}”
Request
The audio sample, 15–30 seconds, at most 25 MiB. The part’s own Content-Type must be the audio’s MIME type.
One GUID per recording, reused for the re-submit and for any retry.
Optional; not required through the API.
Response
The cloned voice, in the shape of a GetVoices item. Null when the sample raised soft warnings and ignoreSoftWarnings was not set.
Soft findings on the sample: SCRIPT_MISMATCH or LOW_QUALITY.
