Перейти к содержанию

Create a voice clone

POSThttps://my.neuronai.uz/api/v1/tts/voices

Creates 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.

    Допустимые значения:uzruenkkkytktgaz

  • ref_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_mediaeducational

  • tagsarray | nullНеобязательный

    Send each tag as its own tags[] field. Blank tags are dropped.

Ответ

200application/json

Success.

  • dataobjectОбязательно
  • request_idstringОбязательно

    Формат: uuid

Заголовки

  • Idempotency-ReplayedstringНеобязательный

    1 when the answer is a replay of an earlier request with the same Idempotency-Key.

  • X-Request-IdstringНеобязательный

    Identifies this request. A JSON body carries it as request_id too; quote it to support.

    Формат: uuid

Ошибки

  • 400

    The Idempotency-Key is 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-Key was already used with a different body: idempotency_conflict.

  • 422

    The request failed validation (invalid_request). error.fields names 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) or service_unavailable (503).