Get speech for given text using the Lightning v3.1 model
## Overview
Lightning v3.1 is a 44 kHz text-to-speech model that delivers natural, expressive, and realistic speech synthesis.
## Key Features
* **Voice Cloning Support**: Compatible with cloned voices
* **Ultra-Low Latency**: Optimized for real-time applications
* **Multi-Language**: Supports English (en) and Hindi (hi)
* **Multiple Output Formats**: PCM, MP3, WAV, and mulaw
* **Flexible Sample Rates**: 8000 Hz to 44100 Hz
* **Speed Control**: Adjustable from 0.5x to 2x speed
Authentication
AuthorizationBearer
Header authentication of the form Bearer <token>
Headers
AcceptenumRequiredDefaults to audio/wav
Must be audio/wav to receive binary audio. Required for proper playback.
Allowed values:
Request
This endpoint expects an object.
textstringRequiredDefaults to Hey i am your a text to speech model
The text to convert to speech.
voice_idstringRequiredDefaults to daniel
The voice identifier to use for speech generation.
sample_rateenumOptional
The sample rate for the generated audio.
Allowed values:
speeddoubleOptional0.5-2Defaults to 1
The speed of the generated speech.
languageenumOptionalDefaults to en
Determines how numbers are spelled out. If set to 'en', numbers will be read in English. If set to 'hi', numbers will be read in Hindi.
Allowed values:
output_formatenumOptionalDefaults to pcm
The format of the output audio.
Allowed values:
pronunciation_dictslist of stringsOptional
The IDs of the pronunciation dictionaries to use for speech generation.
Optional client-provided session identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as X-External-Session-Id.
Optional client-provided request identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as X-External-Request-Id.