# Custom voices

> Your org's own voices on Maya Open-Source, each cloned from one recording you hold the rights to, and spoken by your org alone.

Custom voices are enabled per org. To have them enabled, write to <hello@ttscacherouter.dev>.

## Create a voice

On the dashboard’s [Voices](https://app.ttscacherouter.dev/app/voices) page, or with your API key on the account API. The voice can be spoken as soon as the request returns.

```shell
curl https://api.ttscacherouter.dev/v1/custom-voices \
  -H "Authorization: Bearer $TTS_CACHE_ROUTER_API_KEY" \
  -F name="Priya (support)" \
  -F audio=@priya.wav \
  -F transcript="नमस्ते, मैं आपकी बैंक की ग्राहक सेवा से बोल रही हूँ।" \
  -F language=hi
```

**Response**

```json
{"id": "cv_t76u7a3um3xayk4b", "name": "Priya (support)", "gender": null, "language": "hi",
 "models": [{"model": "maya/maya-2-native", "mode": "icl_spk"}], "revision": 1,
 "created_at": "2026-11-10T01:52:33Z"}
```

| Field | What it is |
| --- | --- |
| `name` | Your label for it, up to 100 characters. You can change it later. |
| `gender` | Optional: `female` or `male`, shown in `GET /v1/voices`. You can change it later. |
| `audio` | The recording: WAV, FLAC or Ogg, up to 30 seconds. Used exactly as uploaded. |
| `transcript` | The exact words spoken in the recording. |
| `language` | The recording’s language: one of Maya’s twelve (`hi`, `ta`, …). |
| `models` | Optional: `{"maya/maya-2-native": {"mode": "icl"}}` to pick a [mode](https://docs.ttscacherouter.dev/custom-voices.md#modes). Left out, `icl_spk`. |

## A good recording

- 3 to 10 seconds of one speaker, with no music, noise or other voices.
- Spoken the way your agent should sound: Maya copies the delivery as well as the voice.
- A transcript that matches the audio word for word.

The voice speaks every language Maya does, keeping some of the recording’s accent; it sounds most like the speaker in the recording’s own language, the one `GET /v1/voices` lists as its `languages`.

## Modes

How Maya clones the voice, chosen with its recording. To compare modes, create one voice in each.

| Mode | What Maya takes from the recording |
| --- | --- |
| `icl_spk` | The voice and its delivery. The default, and Maya's recommendation. |
| `icl` | The delivery most closely, including the recording's room and noise. |
| `spk` | The voice's timbre alone, with Maya's own delivery. |

On a clean recording the three sound alike, and all start as fast as Maya’s own voices.

## Speak it

Pass its `id` as `voice` with `maya/maya-2-native`, on any surface. Only your org can speak it.

**LiveKit plugin**

```python
from livekit.plugins import tts_cache_router as tcr

tts = tcr.TTS(model="maya/maya-2-native", voice="cv_t76u7a3um3xayk4b", language="hi")
```

**curl**

```shell
curl https://api.media.ttscacherouter.dev/v1/audio/speech \
  -H "Authorization: Bearer $TTS_CACHE_ROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "maya/maya-2-native", "voice": "cv_t76u7a3um3xayk4b",
       "language": "hi", "input": "आपका ऑर्डर कल शाम तक पहुँच जाएगा।"}' \
  --output speech.mp3
```

It is cached and priced like any Maya voice. [GET /v1/voices](https://docs.ttscacherouter.dev/reference/voices.md) with `?provider=maya` lists your voices after Maya’s, with `category` `cloned`.

## Replace the recording

Send a new recording and transcript to the voice’s `/recording`, with the fields a create takes except `name` and `gender`. The voice keeps its `id`, so nothing that uses it changes.

```shell
curl -X PUT https://api.ttscacherouter.dev/v1/custom-voices/cv_t76u7a3um3xayk4b/recording \
  -H "Authorization: Bearer $TTS_CACHE_ROUTER_API_KEY" \
  -F audio=@priya-2.wav \
  -F transcript="नमस्ते, मैं आपकी बैंक की ग्राहक सेवा से बोल रही हूँ।" \
  -F language=hi
```

The new recording is ready when the request returns, and every request speaks it within a few seconds; a reply already being spoken finishes in the old one. The voice’s `revision` goes up by one. Audio cached from the old recording is never played for the new one, so each sentence is generated afresh the first time. The language and [mode](https://docs.ttscacherouter.dev/custom-voices.md#modes) are the new recording’s; left out, the mode is `icl_spk`. If Maya can’t use the new recording, the voice keeps its old one. On the dashboard, it’s Replace on the voice.

## Managing voices

- Up to 10 voices per org. Creating and keeping them is free.
- The name and gender change with `PATCH /v1/custom-voices/{id}` (a `gender` of `null` clears it). The recording, transcript, language and mode change together, by [replacing the recording](https://docs.ttscacherouter.dev/custom-voices.md#replace).
- Deleting a voice is immediate, and deletes its recording and transcript. Audio already cached from it can no longer be played, and expires with your org’s retention, at most 30 days.

Every endpoint is in the [REST API reference](https://docs.ttscacherouter.dev/reference/api.md#custom-voices).

## Errors

| Code | When |
| --- | --- |
| `custom_voices_not_enabled` | 403: custom voices aren't enabled for your org yet. |
| `custom_voice_limit` | 409: your org already has 10 voices. |
| `bad_request` | 422: a field is missing or wrong, or Maya couldn't use the recording (too long, too short, unreadable). The message names the field. |
| `provider_unavailable` | 503: Maya Open-Source couldn't be reached. Nothing was kept; try again. |

Speaking a voice your org doesn’t have, or one that was deleted, is a `bad_request`, the same as a misspelt voice name.
