> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tts.monster/llms.txt
> Use this file to discover all available pages before exploring further.

# Voice Cloning (BETA)

> Create, delete, or edit custom TTS voices.

### Header

<ParamField header="Authorization" type="string" placeholder="ttsm_12345-abcdef" required>
  Add your API token here. You can find it by reading the [/authentication](/authentication) page.
</ParamField>

### Body

<ParamField body="action" type="string" required>
  The action to perform. Must be one of: `create`, `delete`, or `edit`.
</ParamField>

#### `create` Action Parameters

<ParamField body="file" type="string" required>
  Base64 encoded audio file (WAV or MP3). Must be between 30 seconds and 5 minutes in length and under 10MB.
</ParamField>

<ParamField body="voice_name" type="string" required>
  Name for the custom voice. Must be between 3 and 50 characters.
</ParamField>

<ParamField body="language" type="string" required>
  The language of the voice. Must be one of the [supported languages](#supported-languages).
</ParamField>

#### `delete` Action Parameters

<ParamField body="voice_id" type="string" required>
  The ID of the custom voice to delete.
</ParamField>

#### `edit` Action Parameters

<ParamField body="voice_id" type="string" required>
  The ID of the custom voice to edit.
</ParamField>

<ParamField body="voice_name" type="string">
  New name for the custom voice. Must be between 3 and 50 characters.
</ParamField>

<ParamField body="language" type="string">
  New language for the voice. Must be one of the [supported languages](#supported-languages):
</ParamField>

### Response

#### `create` Action Response

<ResponseField name="voice_id" type="string">
  Unique identifier for the created voice.
</ResponseField>

<ResponseField name="name" type="string">
  Name of the custom voice.
</ResponseField>

<ResponseField name="language" type="string">
  Language of the voice.
</ResponseField>

<ResponseField name="training" type="string">
  URL to the training audio file.
</ResponseField>

<ResponseField name="sample" type="string">
  URL to a sample generated using the voice. This counts towards your character usage.
</ResponseField>

#### `delete` Action Response

<ResponseField name="message" type="string">
  Confirmation message of the deletion.
</ResponseField>

#### `edit` Action Response

<ResponseField name="voice_id" type="string">
  ID of the edited voice.
</ResponseField>

<ResponseField name="name" type="string">
  Updated name (if changed).
</ResponseField>

<ResponseField name="language" type="string">
  Updated language (if changed).
</ResponseField>

<ResponseField name="sample" type="string">
  New sample URL (if language was changed). This counts towards your character usage.
</ResponseField>

### Limitations

* Voice creation is limited based on your subscription plan
* Audio files must be between 30 seconds and 5 minutes in duration
* File size limit is 10MB
* Voice names must be between 3 and 50 characters
* Only WAV and MP3 file formats are supported

### Supported Languages

* English v3 **(New)** `en-v3`
  * Our newest English voice model has greatly improved quality and more natural sounding speech.
* English v2 `en-v2`
* English v1 `en`
* Spanish `es`
* French `fr`
* Japanese `ja`
* Korean `ko`
* Italian `it`
* Polish `pl`
* German `de`
* Portuguese `pt`
* Arabic `ar`
* Dutch `nl`
* Russian `ru`

<RequestExample>
  ```bash Create Voice theme={null}
  curl -X POST https://api.console.tts.monster/voice-cloning \
  -H "Content-Type: application/json" \
  -H "Authorization: ttsm_12345-abcdef" \
  -d '{
        "action": "create",
        "voice_name": "My Custom Voice",
        "language": "en",
        "file": "data:audio/wav;base64,..."
      }'
  ```

  ```bash Delete Voice theme={null}
  curl -X POST https://api.console.tts.monster/voice-cloning \
  -H "Content-Type: application/json" \
  -H "Authorization: ttsm_12345-abcdef" \
  -d '{
        "action": "delete",
        "voice_id": "9aad4a1b-f04e-43a1-8ff5-4830115a10a8"
      }'
  ```

  ```bash Edit Voice theme={null}
  curl -X POST https://api.console.tts.monster/voice-cloning \
  -H "Content-Type: application/json" \
  -H "Authorization: ttsm_12345-abcdef" \
  -d '{
        "action": "edit",
        "voice_id": "9aad4a1b-f04e-43a1-8ff5-4830115a10a8",
        "voice_name": "New Voice Name",
        "language": "es"
      }'
  ```
</RequestExample>

<ResponseExample>
  ```json Create Response theme={null}
  {
    "voice_id": "9aad4a1b-f04e-43a1-8ff5-4830115a10a8",
    "name": "My Custom Voice",
    "language": "en",
    "training": "https://script.tts.monster/abc123.wav",
    "sample": "https://script-samples.tts.monster/abc123.wav"
  }
  ```

  ```json Delete Response theme={null}
  {
    "message": "Custom voice deleted"
  }
  ```

  ```json Edit Response theme={null}
  {
    "voice_id": "9aad4a1b-f04e-43a1-8ff5-4830115a10a8",
    "name": "New Voice Name",
    "language": "es",
    "sample": "https://script-samples.tts.monster/abc123.wav"
  }
  ```
</ResponseExample>
