Lightning v2

Generate speech from text (Lightning v2)

Converts provided text to speech using the Lightning v2 model.

post/api/v1/lightning-v2/stream

Request body

textstring required

The text to convert to speech.

voice_idstring required

The voice identifier to use for speech generation.

sample_rateinteger

The sample rate for the generated audio.

speednumber

The speed of the generated speech.

consistencynumber

This parameter controls word repetition and skipping. Decrease it to prevent skipped words, and increase it to prevent repetition.

similaritynumber

This parameter controls the similarity between the generated speech and the reference audio. Increase it to make the speech more similar to the reference audio.

enhancementnumber

Enhances speech quality at the cost of increased latency.

language'en' | 'hi' | 'ta' | 'kn' | 'mr' | 'bn' | 'gu' | 'ar' | 'he' | 'fr' | 'de' | 'pl' | 'ru' | 'it' | 'nl' | 'es' | 'sv' | 'ml' | 'te'

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.

pronunciation_dictsstring[]

The IDs of the pronunciation dictionaries to use for speech generation.

Response

Synthesized speech retrieved successfully.

Changes