---
title: "Create Speech"
method: POST
path: "/audio/speech"
---

# Create Speech

`POST /audio/speech`

Generate audio from text using text-to-speech models

## Request body

- AudioSpeechRequest
  - `model` string, required — The TTS model to use for speech generation
  - `input` string — The text to convert to speech (OpenAI models)
  - `voice` string — The voice to use for speech generation (OpenAI, Orpheus, PlayAI, ElevenLabs models)
  - `response_format` 'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm' — The audio format for the generated speech
  - `speed` number — The speed of the generated audio
  - `temperature` number — Temperature for randomness in speech generation
  - `top_p` number — Top-p value for nucleus sampling
  - `instructions` string — Additional instructions to control voice generation (GPT-4o Mini TTS)
  - `speaker_transcript` string — Speaker transcript for Dia model
  - `cfg_filter_top_k` integer — CFG filter top k value (Dia model)
  - `cfg_scale` integer — CFG scale value (Dia model)
  - `speech_rate` integer — Speech rate adjustment for Microsoft TTS (-100 to 100)
  - `pitch_adjustment` integer — Pitch adjustment for Microsoft TTS (-100 to 100)
  - `emotional_style` string — Emotional style for Microsoft TTS (e.g., 'cheerful', 'sad', 'angry')

## Response `200`

Audio file

---

[API](https://skmtc.dev/electronhub/apis/electron-hub-api.md) · [All operations](https://skmtc.dev/electronhub/apis/electron-hub-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/electronhub/electron-hub-api/revisions/727f9c51555b/schema)
