---
title: "Text-to-speech"
method: POST
path: "/v1/audio/speech"
tags: ["Audio"]
---

# Text-to-speech

`POST /v1/audio/speech`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/audio/speech`
- Auth: HTTP bearer

Synthesizes speech from text. Returns raw WAV audio data.
Supports voice cloning via `ref_audio` (base64 WAV).

## Request body

- SpeechRequest
  - `input` string, required: Text to synthesize
  - `voice` string: Voice name
  - `speed` number: Speech speed multiplier
  - `model` string: TTS model to use
  - `ref_audio` string: Base64-encoded WAV for voice cloning (Qwen3 TTS only)
  - `ref_audio_mime_type` string: MIME type of ref_audio

## Response `200`

WAV audio data

## Other responses

- `400`: Invalid request
- `413`: Payload too large
- `503`: TTS backend not running

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
