---
title: "Generate speech from text (Lightning)"
method: POST
path: "/api/v1/lightning/get_speech"
tags: ["Lightning"]
---

# Generate speech from text (Lightning)

`POST /api/v1/lightning/get_speech`

Converts provided text to speech using the Lightning model.

## Request body

- LightningRequest
  - `text` string, required — The text to convert to speech.
  - `voice_id` string, required — The voice identifier to use for speech generation.
  - `sample_rate` integer — The sample rate for the generated audio.
  - `speed` number — The speed of the generated speech.
  - `language` 'en' | 'hi' — Determines how numbers are spelled out. If set to 'en', numbers will be read as individual digits in English. If set to 'hi', numbers will be read as individual digits in Hindi.
  - `output_format` 'pcm' | 'mp3' | 'wav' | 'mulaw' — The format of the output audio.

## Response `200`

Synthesized speech retrieved successfully.

## Other responses

- `400` — Bad request.
- `401` — Unauthorized.
- `500` — Server error occurred.

---

[API](https://skmtc.dev/smallest-inc/apis/waves-api.md) · [All operations](https://skmtc.dev/smallest-inc/apis/waves-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/smallest-inc/waves-api/revisions/cfd5301f2e11/schema)
