---
title: "Text To Speech"
method: POST
path: "/v1/text2speech"
tags: ["Text-to-Speech"]
---

# Text To Speech

`POST /v1/text2speech`

Converts text into speech using a voice of your choice and returns audio.

## Headers

- `x-api-key` string

## Request body

- TTSBodySchemas
  - `text` string, required
  - `speaker` string, required
  - `emotion` string, nullable — some voice have emotion: Angry, Cheerful, Sad, Excited, Friendly, Terrified, Shouting, Unfriendly, Whispering, Hopeful, Soulful, Pleasant, Complaining, Surprised, Uneasy, Fearful, Disgust

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/topmediai/apis/topmediai-api-documentation.md) · [All operations](https://skmtc.net/topmediai/apis/topmediai-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/topmediai/topmediai-api-documentation/revisions/5d9205965da7/schema)
