Messages
{
"type": "init",
"voice": "aura-2-thalia-en",
"config": {
"sample_rate": 24000,
"encoding": "linear16"
}
}{
"type": "text",
"text": "Hello, how can I help you?"
}{
"type": "flush"
}{
"type": "close"
}{
"type": "keepalive"
}{
"type": "ready",
"session_id": "1e1a9598-077e-4d9d-aba6-78af6363f27c",
"slng_request_id": "2c9953d7-d4b4-4385-bb27-f64e0d979be5"
}"0000FF00000000FF00000000010101010101010100000000FFFFFFFFFFFEFEFDFEFEFEFEFDFDFEFEFEFEFEFEFEFEFEFFFFFFFFFEFEFEFEFF0001000001020303030303030303030201010000FFFFFEFDFDFDFDFEFFFFFFFF0001020303020201000000FFFDFCFBFAFAFBFAF9F8F7F7F7F6F6F4F2F2F3F7FC000406090F14191A19181715110E0A05FEF9F6F3F0EEECEBEBECEEF2F6F9FC0005090D0F101010100E0C080401"{
"type": "flushed"
}{
"type": "audio_end",
"data": {
"event_type": "final"
}
}{
"type": "error",
"data": {
"request_id": "req_abc123",
"message": "Upstream service unavailable",
"code": "provider_error"
},
"message": "Upstream service unavailable",
"code": "provider_error"
}Unified TTS
Unified TTS
Stream synthesized audio from any SLNG-supported TTS model over the unified WebSocket protocol with init, text, flush, and binary audio frames.
WSS
/
v1
/
bridges
/
unmute
/
tts
/
{model_variant}
Messages
{
"type": "init",
"voice": "aura-2-thalia-en",
"config": {
"sample_rate": 24000,
"encoding": "linear16"
}
}{
"type": "text",
"text": "Hello, how can I help you?"
}{
"type": "flush"
}{
"type": "close"
}{
"type": "keepalive"
}{
"type": "ready",
"session_id": "1e1a9598-077e-4d9d-aba6-78af6363f27c",
"slng_request_id": "2c9953d7-d4b4-4385-bb27-f64e0d979be5"
}"0000FF00000000FF00000000010101010101010100000000FFFFFFFFFFFEFEFDFEFEFEFEFDFDFEFEFEFEFEFEFEFEFEFFFFFFFFFEFEFEFEFF0001000001020303030303030303030201010000FFFFFEFDFDFDFDFEFFFFFFFF0001020303020201000000FFFDFCFBFAFAFBFAF9F8F7F7F7F6F6F4F2F2F3F7FC000406090F14191A19181715110E0A05FEF9F6F3F0EEECEBEBECEEF2F6F9FC0005090D0F101010100E0C080401"{
"type": "flushed"
}{
"type": "audio_end",
"data": {
"event_type": "final"
}
}{
"type": "error",
"data": {
"request_id": "req_abc123",
"message": "Upstream service unavailable",
"code": "provider_error"
},
"message": "Upstream service unavailable",
"code": "provider_error"
}bearer
type:http
API key issued by SLNG. Pass as Authorization: Bearer <token> in the WebSocket upgrade request headers.
method
type:string
GET
Init (Unmute TTS)
type:object
Initialize Unmute TTS session with voice and configuration.
Text (Unmute TTS)
type:object
Send text to synthesize.
Flush (Unmute TTS)
type:object
Flush buffered audio.
Close (Unmute TTS)
type:object
Close TTS session.
Keepalive Message
type:object
Keep the WebSocket connection alive during silence.
Ready (Unmute TTS)
type:object
Unmute TTS session is ready.
Binary Audio Frame
type:object
Raw binary audio frame from Unmute TTS.
Flushed (Unmute TTS)
type:object
All buffered audio has been flushed.
Audio End (Unmute TTS)
type:object
All audio for the current synthesis has been sent.
Error (Unmute TTS)
type:object
Error occurred during Unmute TTS session.