# Maya Open-Source

> Maya Research's open-source Maya 2 Native, hosted by us: 12 Indian languages, in our voices or your own, through our LiveKit plugin, our Pipecat service or /v1/audio/speech, with no provider key.

> **Write each word in its own script**
>
> Maya pronounces a word most reliably when it is written in the script of its language: a Hindi word in Devanagari, a Tamil word in Tamil script, an English word in Latin letters. The same Hindi word spelled in Latin letters (`dhanyavaad` for `धन्यवाद`) is more likely to be mispronounced.
>
> If an LLM writes your agent’s replies, say so in its system prompt, for example: “Write every word in the script of its own language: Hindi words in Devanagari, English words in English letters. Never write a Hindi word in English letters.”

## With our LiveKit plugin

Maya Research’s open-source Maya 2 Native, which we run on our own GPU: our voices, or your own, in 12 Indian languages, with no provider key. Language codes are bare (`hi`, not `hi-IN`); leave `language` out and Maya picks it from the script of the text. Try every voice in the dashboard’s [playground](https://app.ttscacherouter.dev/app/playground).

```shell
pip install livekit-plugins-tts-cache-router
```

**agent.py**

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

# The API key comes from TTS_CACHE_ROUTER_API_KEY.
tts = tcr.TTS(
    model="maya/maya-2-native",
    voice="Monika",
    language="hi",
)
```

Pass `tts` to `AgentSession(tts=tts)`. Set `TTS_CACHE_ROUTER_API_KEY` in the agent’s environment; Maya Open-Source needs no key of its own. `TTS`’s own arguments are on [the plugin’s page](https://docs.ttscacherouter.dev/livekit.md#tts).

### Options

`tcr.TTS(...)`’s settings for Maya Open-Source, in the router’s names: `model`, `voice`, `language` and `speed` as arguments, and the rest in the `options` dict (`options={"name": value}`). The router checks them; the languages per model are in [Models and options](https://docs.ttscacherouter.dev/reference/models.md#maya).

| Field | Type | Required or default | Values | Description |
| --- | --- | --- | --- | --- |
| `model` | string | Required | maya/maya-2-native | Which model synthesizes the replies, with its provider. |
| `voice` | string | Required |  | A voice of the chosen model, passed to Maya Open-Source as given. See [models and voices](https://docs.ttscacherouter.dev/reference/models.md#maya-models). |
| `language` | string \| null | Optional |  | A Maya Open-Source language code from [languages](https://docs.ttscacherouter.dev/reference/models.md#maya-languages), passed through as given. Leave it out and Maya Open-Source detects the language. |
| `sample_rate` | int | Default `24000` | 24000 | Of the audio you receive, in Hz. |
| `options.normalize` | boolean \| null | Default `null` |  | Speak numbers, currency, dates, times, OTPs, phone numbers, URLs and emails as words in the request's language. Null: Maya's default (on). |
| `options.temperature` | number \| null | Default `null` | 0.1 – 1.5 | Sampling temperature: lower is steadier, higher is more varied. Null: Maya's default. |
| `options.top_k` | integer \| null | Default `null` | 1 – 2048 | Sample from the k likeliest codes. Null: Maya's default. |
| `options.top_p` | number \| null | Default `null` | 0.0 – 1.0 | Nucleus sampling, above 0 and at most 1. Null: Maya's default. |
| `options.repetition_penalty` | number \| null | Default `null` | 0.0 – 5.0 | Penalty on recently repeated codes. Null: Maya's default. |
| `options.seed` | integer \| null | Default `null` |  | Sampling seed, 0 to 2^63 - 1. The same seed repeats a take only when Maya runs the request alone. Null: a seed of Maya's. |

### Changing settings

Replies that start afterwards use the new settings:

```python
tts.update_options(voice="Ritvik", options={"temperature": 0.8})

# Another language: the voice can stay, though one trained on it sounds most native.
tts.update_options(language="ta", voice="Kayal")
```

## With Pipecat

Our Pipecat service takes the same settings as the LiveKit plugin.

```shell
pip install pipecat-tts-cache-router
```

**bot.py**

```python
import os

from pipecat_tts_cache_router import TTSCacheRouterTTSService

tts = TTSCacheRouterTTSService(
    api_key=os.environ["TTS_CACHE_ROUTER_API_KEY"],
    settings=TTSCacheRouterTTSService.Settings(
        model="maya/maya-2-native",
        voice="Monika",
        language="hi",
    ),
)
```

Put `tts` in your pipeline where a TTS service goes, after the LLM. The rest is on [the service’s page](https://docs.ttscacherouter.dev/pipecat.md).

## /v1/audio/speech

The router’s OpenAI-shaped [/v1/audio/speech](https://docs.ttscacherouter.dev/clients/speech.md) with `maya/maya-2-native` as the model, so the OpenAI SDK works with the base URL and key changed. Maya has no API of its own to mirror: this is its HTTP API.

**OpenAI SDK**

```python
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.media.ttscacherouter.dev/v1",
    api_key=os.environ["TTS_CACHE_ROUTER_API_KEY"],
)

with client.audio.speech.with_streaming_response.create(
    model="maya/maya-2-native",
    voice="Monika",
    input="नमस्ते, आपका ऑर्डर कल पहुँच जाएगा।",
    response_format="mp3",
    extra_body={"language": "hi"},
) as response:
    response.stream_to_file("speech.mp3")
```

**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": "Monika", "language": "hi",
       "input": "नमस्ते, आपका ऑर्डर कल पहुँच जाएगा।",
       "response_format": "pcm", "temperature": 0.8}' \
  --output speech.pcm

# 16-bit PCM, 24000 Hz, mono
ffplay -f s16le -ar 24000 -ch_layout mono speech.pcm
```

- `response_format`: `pcm` or `wav` (16-bit, 24000 Hz, mono) or `mp3` (24000 Hz mono), each made by Maya itself. There is no `mulaw`, `alaw`, `opus` or `flac`, and the router never re-encodes.
- The other fields are top-level, as the OpenAI SDK’s `extra_body`: `language`, `normalize`, `temperature`, `top_k`, `top_p`, `repetition_penalty` and `seed`. Their ranges are in [Models and options](https://docs.ttscacherouter.dev/reference/models.md#maya-settings). Maya takes no `speed`.
- A browser can call it too: the router answers CORS on `/v1/audio/speech` and `/v1/voices` for this site, which is how the dashboard’s playground plays Maya.

## Voices

Our voices, each cloned from a recording made for voice agents. Every voice speaks every language; it sounds most native in its recording’s language, and elsewhere speaks cross-lingually, with some of that accent. `voice` is the name, in any case.

| Voice | Profile | Recorded in |
| --- | --- | --- |
| Bunty | Young male voice, friendly, casual | Hindi |
| Monika | Young female voice, warm, helpful | Hindi |
| Umananda | Adult male voice, steady, friendly | Assamese |
| Rimjhim | Young female voice, clear, expressive | Bengali |
| Muskan | Adult female voice, warm, sweet | Gujarati |
| Srivatsa | Adult male voice, casual, natural | Kannada |
| Mahendran | Young male voice, relatable, natural | Malayalam |
| Sunaina | Adult female voice, warm, clear | Malayalam |
| Amogh | Young male voice, casual, engaging | Marathi |
| Kalyani | Young female voice, warm, gentle | Marathi |
| Swastik | Adult male voice, casual, warm | Odia |
| Raqib | Young male voice, warm, conversational | Punjabi |
| Vennila | Young female voice, warm, easygoing | Tamil |
| Bhaavana | Young female voice, natural, warm | Telugu |

[GET /v1/voices](https://docs.ttscacherouter.dev/reference/voices.md) lists them with `?provider=maya`, each with its language and profile, followed by your org’s [custom voices](https://docs.ttscacherouter.dev/providers/maya.md#custom-voices). The languages are Assamese (`as`) , Bengali (`bn`) , English (`en`) , Gujarati (`gu`) , Hindi (`hi`) , Kannada (`kn`) , Malayalam (`ml`) , Marathi (`mr`) , Odia (`or`) , Punjabi (`pa`) , Tamil (`ta`) and Telugu (`te`).

Maya reads the tags `[laughs]`, `[sighs]`, `[whispers]`, `[sad]` and `[excited]` in the text, best effort.

## Custom voices

Your org’s own voices, each cloned from one recording you hold the rights to and spoken by your org alone. Create one on the dashboard’s [Voices](https://app.ttscacherouter.dev/app/voices) page or with `POST /v1/custom-voices`, then pass its `id` (`cv_…`) as `voice`. Enabled per org on request. See [Custom voices](https://docs.ttscacherouter.dev/custom-voices.md).

## What is cached

- Each sentence: the router splits the text at sentence ends (including `।`) and at the opening sentence’s first comma, with the splitter it uses for Sarvam and Raya, and sends each piece to Maya on its own. A sentence your org has synthesized before with the same voice, language, settings and format comes from the cache, whatever text surrounds it.
- Our plugins, [/v1/stream](https://docs.ttscacherouter.dev/clients/stream.md) and [/v1/audio/speech](https://docs.ttscacherouter.dev/clients/speech.md) share cached sentences when the request is the same. PCM and WAV share entries; MP3 has its own.
- Only a complete take is cached: one Maya ended on its own. A take cut short (by Maya’s length or loop guard, an error or an interruption) is never cached.
- An entry belongs to the model revision we run. When we upgrade Maya’s weights, your sentences are synthesized afresh the next time.
- Audio is kept for your org’s [retention](https://docs.ttscacherouter.dev/index.md#retention), counted from its last use.

## Pricing

- **$0.003 per 1,000 characters Maya synthesizes** (₹0.30), taken from your credit. There is no provider bill: we run the GPU.
- **$0.002 per 1,000 characters served from the cache**, as for every provider.
- The $10 of credit every new org starts with covers Maya too. See [Pricing and billing](https://docs.ttscacherouter.dev/pricing.md).

## Limits and timeouts

- Maya runs on one GPU server of ours in Delhi, India. If it is down, Maya requests fail with `provider_unavailable` until it is back; sentences already in your cache still play. We will add servers as traffic grows.
- When the GPU is at capacity, Maya refuses a request before any audio rather than slowing every stream down, and you get `provider_rate_limited`.
- Maya’s first audio for a sentence within 5 seconds, then 5 seconds at most between chunks; otherwise the sentence fails with `provider_timeout`.

## Errors

Maya's refusals become the router's error codes, as for every provider.

- `provider_rate_limited`, with the message “Maya Open-Source is at capacity, try again”: the GPU is full. Retry after a moment.
- `provider_rejected`: Maya refused the request, with its message passed through.
- `provider_unavailable`: the GPU server can’t be reached or failed. `provider_timeout`: it sent nothing in time.
- `bad_request`: an unknown voice or language, or a setting out of range, refused before anything reaches Maya. There is never a `provider_key_missing`.

The rest are on [Errors](https://docs.ttscacherouter.dev/reference/errors.md).

## About Maya 2 Native

Maya 2 Native is an open-weights text-to-speech model made by [Maya Research](https://www.mayaresearch.ai) and released on 25 October 2026. We run it unchanged; Maya Research doesn’t operate this service.

- **License.** The weights and the [inference code](https://github.com/MayaResearch/maya2-native) are Apache-2.0. It builds on Qwen3-1.7B-Base (Apache-2.0), Kyutai’s Mimi codec (CC-BY-4.0) and SpeechBrain’s ECAPA-TDNN (Apache-2.0). The [model card](https://huggingface.co/maya-research/maya2-native) has the details.
- **What it speaks.** 12 languages, 24 kHz mono, streamed in 80 ms frames. Through us: PCM, WAV and MP3.
- **How it was evaluated**, as Maya Research reports it: #2 in VoiceArena’s Hindi real-time ranking (Elo 1047 ±11, checked 27 October 2026), and a character error rate of 2.9–3.5% over 6,000 held-out texts in the 12 languages, by three speech recognizers. These are automated judges; there is no human listening study.
- **Where it is weaker**, by the model card: Assamese, which no voice is trained on; one- or two-word replies, whose voice is less stable; web addresses, symbols, long digit strings and heavily mixed languages.
- **Where it runs.** One GPU server of ours at E2E Networks in Delhi, India; your text goes there for synthesis and nowhere else.

> **Use it openly**
>
> Maya Research asks that synthetic speech be disclosed to listeners, especially on calls, and that it never be used to impersonate people, defraud or defeat voice authentication. Its audio carries no watermark. The voice names are synthetic personas; don’t present them as real people.
