# Speech synthesis · TTS API — neuraldeep.tech API

> One section of the machine-readable reference. All sections: https://neuraldeep.tech/llms.txt · everything in one file: https://neuraldeep.tech/llms-full.txt

Base URL: `https://api.neuraldeep.tech/v1`
Auth: `Authorization: Bearer $YOUR_KEY`

With the same key — speech synthesis under `/v1/audio/speech`: text → audio (WAV 24 kHz). The **Qwen3-TTS** model on our GPUs. Available on **all plans**, a separate bucket — the limit is counted in **characters** of input text. The request format is **OpenAI-compatible** and works **synchronously**: send text → get an audio file right away.

**8 voices:** `vivian`, `serena`, `ono_anna`, `sohee` (female) · `dylan`, `ryan`, `aiden`, `uncle_fu` (male) — multilingual. **10 languages:** `Russian`, `English`, `German`, `French`, `Spanish`, `Italian`, `Chinese`, `Japanese`, `Korean`, `Portuguese` (+`Auto`). **Emotion and style** are set as free text in `instructions` ("cheerfully", "a calm announcer"). Voice list: `GET /v1/audio/voices`. The quota remainder comes with every response in the `X-Quota-Day-Remaining` and `X-Quota-Month-Remaining` headers. Exhaustion: `429` with a `quota_exceeded` body and `Retry-After`.

**🇷🇺 Russian — with stress marks.** With `language=Russian` the synthesis uses a separate model, **ESpeech** (F5 + RUAccent) — it **places stress correctly and resolves homographs** by context (zamók "a lock" → zámok "a castle"), where ordinary TTS gets it wrong. Other languages run on Qwen3-TTS. Which engine synthesized is shown in the response header `X-TTS-Engine` (`espeech`/`qwen`). To set stress manually — put `+` before the stressed vowel (`«zam+ok»`); if `+` is already in the text, the auto-accentizer doesn't intervene.

```bash
# synthesis (voice serena, Russian) → file
curl -s https://api.neuraldeep.tech/v1/audio/speech \
  -H "Authorization: Bearer $YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"input":"Hello! This is speech synthesis on our servers.","voice":"serena","language":"Russian"}' \
  -o speech.wav

# with emotion (via instructions)
curl -s https://api.neuraldeep.tech/v1/audio/speech \
  -H "Authorization: Bearer $YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"input":"Congratulations on the release!","voice":"vivian","language":"Russian","instructions":"cheerfully, with enthusiasm"}' \
  -o happy.wav

# manual stress via "+" (zam+ok = padlock) — RUAccent doesn't intervene if "+" is already present
curl -s https://api.neuraldeep.tech/v1/audio/speech \
  -H "Authorization: Bearer $YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"input":"On povesil ambarnyy zam+ok.","voice":"serena","language":"Russian"}' \
  -o stress.wav

# voice list
curl https://api.neuraldeep.tech/v1/audio/voices -H "Authorization: Bearer $YOUR_KEY"
```

```python
import httpx

r = httpx.post(
    "https://api.neuraldeep.tech/v1/audio/speech",
    headers={"Authorization": "Bearer $YOUR_KEY"},
    json={"input": "Text to synthesize.", "voice": "dylan", "language": "Russian"},
)
open("speech.wav", "wb").write(r.content)
```

> The limit is counted in text characters (`len(input)`), not requests. Voice cloning from a sample is not available yet.

**Input limits and errors.**

- `input` is required, up to 5,000 characters per call. Empty text gives `400`, longer text `413`. Split long text by sentences and join the audio.
- An unknown `voice` gives `400` with the voice list. OpenAI voices (`alloy`, `nova` and others) are mapped to close ones of ours, so the OpenAI SDK works as is: `client.audio.speech.create(model="tts-1", voice="alloy", input=...)`. The voice actually used comes back in the `X-TTS-Voice` header.
- Output: WAV, 24 kHz, mono, 16-bit. The response has to fit into 120 seconds.
- A voice cloning attempt: `403`. A synthesis failure returns the quota and an error with the engine status.
