{
"type": "init",
"voice": "pNInz6obpgDQGcFmaJgB",
"config": {
"sample_rate": 24000,
"encoding": "mp3"
}
}{
"type": "text",
"text": "Hello, this is a test of text-to-speech synthesis."
}{
"type": "flush"
}{
"type": "clear"
}{
"type": "close"
}{
"type": "ready",
"session_id": "sess_tts_abc123"
}{
"type": "audio_chunk",
"data": "UklGRiQAAABXQVZFZm10IBAAAAABAAEA...",
"sequence": 1
}{
"type": "flushed"
}{
"type": "cleared"
}{
"type": "audio_end",
"data": null
}{
"type": "error",
"code": "provider_error",
"message": "Provider returned an unexpected error"
}ElevenLabs Flash v2.5
Stream ultra-low-latency multilingual speech synthesis from ElevenLabs Flash v2.5 over WebSocket for real-time conversational voice applications.
Documentation Index
Fetch the complete documentation index at: https://docs.slng.ai/llms.txt
Use this file to discover all available pages before exploring further.
{
"type": "init",
"voice": "pNInz6obpgDQGcFmaJgB",
"config": {
"sample_rate": 24000,
"encoding": "mp3"
}
}{
"type": "text",
"text": "Hello, this is a test of text-to-speech synthesis."
}{
"type": "flush"
}{
"type": "clear"
}{
"type": "close"
}{
"type": "ready",
"session_id": "sess_tts_abc123"
}{
"type": "audio_chunk",
"data": "UklGRiQAAABXQVZFZm10IBAAAAABAAEA...",
"sequence": 1
}{
"type": "flushed"
}{
"type": "cleared"
}{
"type": "audio_end",
"data": null
}{
"type": "error",
"code": "provider_error",
"message": "Provider returned an unexpected error"
}API key issued by SLNG. Pass as Authorization: Bearer <token> in the WebSocket upgrade request headers.
GET
Target world part override. Auto-selected if not provided. Available world parts: eu, ap.
eu, apInitialize a TTS session with voice and synthesis configuration.
Send text to synthesize into audio output.
Force any buffered text/audio to be finalized and delivered.
Clear any queued text/audio from the current session.
Close the session and stop any further audio.
Indicates the session is ready to receive messages.
Chunk of base64-encoded audio data.
Acknowledges that buffered output was flushed.
Acknowledges that queued output was cleared.
Signals the end of audio generation.
Indicates an error occurred during synthesis.
Was this page helpful?