Create a voice clone
https://my.neuronai.uz/api/v1/tts/voicesCreates a voice clone from a 10 to 15 second recording of the voice and a transcript of what it says.
Use the new voice's id as voice_id when you synthesize.
Нужен API-ключ с voices:write.
Заголовки
Idempotency-KeystringНеобязательныйMakes a retry safe: the same key again answers 200 with the voice it created, as it is now, instead of cloning another. At most 191 characters, scoped to your organization and kept indefinitely.
Тело запроса
multipart/form-dataФорма multipart.
namestringОбязательноA name for the voice.
Макс. длина: 120
languagestringОбязательноThe language the recording is in.
Допустимые значения:
uzruenkkkytktgazref_audiostringОбязательноA 10 to 15 second recording of the voice: WAV, MP3, OGG or FLAC, at most 10 MB.
ref_textstringОбязательноWhat the recording says, word for word.
Макс. длина: 1000
categorystringНеобязательныйДопустимые значения:
conversationalnarrationcharacterssocial_mediaeducationaltagsarray | nullНеобязательныйSend each tag as its own
tags[]field. Blank tags are dropped.
Ответ
200application/jsonSuccess.
dataobjectОбязательноrequest_idstringОбязательноФормат: uuid
Заголовки
Idempotency-ReplayedstringНеобязательный1when the answer is a replay of an earlier request with the sameIdempotency-Key.X-Request-IdstringНеобязательныйIdentifies this request. A JSON body carries it as
request_idtoo; quote it to support.Формат: uuid
Ошибки
- 400
The
Idempotency-Keyis over 191 characters:invalid_request. - 401
The API key is missing or not recognized (
invalid_api_key), revoked (api_key_revoked), disabled (api_key_disabled) or expired (api_key_expired). - 403
The key lacks the permission this endpoint needs (
insufficient_permissions), or the client IP is not in its allowlist (ip_not_allowed). - 409
The
Idempotency-Keywas already used with a different body:idempotency_conflict. - 422
The request failed validation (
invalid_request).error.fieldsnames each invalid field. - 502
The voice service could not do it:
upstream_error. Nothing is created. - default
Any other error, in the same shape, such as
server_error(500) orservice_unavailable(503).