---
title: "Text to speech"
method: POST
path: "/v1/tts"
tags: ["Speech"]
---

# Text to speech

`POST /v1/tts`

## Request

- Base URL: `https://api.dharun.dev`
- URL: `https://api.dharun.dev/v1/tts`
- Auth: none declared

Returns the audio itself; X-Voice and X-Voice-Licence headers name the voice and its licence. Up to 3,000 characters; split longer text. Write the text in its own script: Hindi in Devanagari, Telugu in Telugu, Malayalam in Malayalam.

## Query parameters

- `voice` string
- `format` 'mp3' | 'ogg' | 'wav'
- `speed` string

## Request body

- object
  - `format` 'mp3' | 'ogg' | 'wav': Default mp3.
  - `speed` string: 0.5 to 2. Default 1.
  - `text` string, required: The text to speak.
  - `voice` string: A voice ID from /v1/tts/voices, or a language (hi, te, ml, en, en-GB) for its first voice that may be used commercially. Default en.

## Response `200`

Success

## Other responses

- `400`: Error
- `404`: Error
- `429`: Error

---

[API](https://skmtc.dev/dharun/apis/india-api-free-open-source-apis-for-indian-data.md) · [All operations](https://skmtc.dev/dharun/apis/india-api-free-open-source-apis-for-indian-data/llms.txt) · [OpenAPI document](https://skmtc.dev/dharun/apis/india-api-free-open-source-apis-for-indian-data/revisions/ecd8b0ec7863?raw)
