Asosiy mazmunga oʻtish

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.

voices:write ruxsatli API kalit kerak.

Sarlavhalar

  • Idempotency-KeystringIxtiyoriy

    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.

Soʻrov tanasi

multipart/form-data

Multipart forma.

  • namestringMajburiy

    A name for the voice.

    Maks. uzunlik: 120

  • languagestringMajburiy

    The language the recording is in.

    Ruxsat etilgan qiymatlar:uzruenkkkytktgaz

  • ref_audiostringMajburiy

    A 10 to 15 second recording of the voice: WAV, MP3, OGG or FLAC, at most 10 MB.

  • ref_textstringMajburiy

    What the recording says, word for word.

    Maks. uzunlik: 1000

  • categorystringIxtiyoriy

    Ruxsat etilgan qiymatlar:conversationalnarrationcharacterssocial_mediaeducational

  • tagsarray | nullIxtiyoriy

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

Javob

200application/json

Success.

  • dataobjectMajburiy
  • request_idstringMajburiy

    Format: uuid

Sarlavhalar

  • Idempotency-ReplayedstringIxtiyoriy

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

  • X-Request-IdstringIxtiyoriy

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

    Format: uuid

Xatolar

  • 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).