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

# Generate speech from text (Lightning)

`POST /waves/v1/lightning/get_speech`

Get speech for given text using the Waves API

## 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' | 'ulaw' | 'alaw' — The format of the output audio.

## Response `200`

Synthesized speech retrieved successfully.

## Other responses

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

## Changes

- **2026-05-07** `cbcd21121404` — 1 breaking, 2 info
  - removed the enum value `mulaw` of the request property `output_format`
  - added the new `alaw` enum value to the request property `output_format`
  - added the new `ulaw` enum value to the request property `output_format`
- **2026-03-14** `0cb9266abb2a` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/smallest-inc/apis/waves-api/changes/waves/v1/lightning/get_speech/post.md)

---

[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.dev/smallest-inc/apis/waves-api/revisions/f15bf34622aa?raw)
