Generate speech (TTS)
Turns text into spoken audio.
Send up to 2,000 characters with the language they are written in, optionally choosing a male or female voice, and receive one complete WAV file ready to play or store. Use it for assistant replies, notifications, IVR prompts and read-aloud features.
The generated audio is returned as a single WAV file containing 16-bit PCM samples in one channel, at the sample rate published in the catalog, which is 24 kHz today. Requests are charged by the number of input characters, at 100 characters per credit; the length of the generated audio does not affect the charge. For reference, the duration of the audio is reported in the X-Llynx-Audio-Duration-Ms response header.
The response body is the audio itself, not JSON. When testing with curl, add -o speech.wav to save it to a file.
Authentication
Your Llynx API key, sent as Authorization: Bearer <key>.
Request
The text to speak, up to 2,000 characters including spaces and punctuation. Whitespace-only text is rejected.
Language the text is written in, as a tag from the Languages page, for example hi or en.
Audio container. Only wav is available.
Response headers
Response
Complete WAV audio; the credit reserved for the request is reported in headers