Messages
{
"type": "init",
"stream_id": "stream-1",
"model": "tts-rt-v1",
"language": "en",
"voice": "Adrian",
"audio_format": "wav",
"sample_rate": 24000
}{
"type": "text",
"stream_id": "stream-1",
"text": "Hello from Soniox text-to-speech.",
"text_end": false
}{
"type": "clear",
"stream_id": "stream-1",
"cancel": true
}{
"type": "audio_chunk",
"audio": "UklGRiQAAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQAAAAA=",
"audio_end": false,
"stream_id": "stream-1"
}{
"type": "terminated",
"terminated": true,
"stream_id": "stream-1"
}{
"type": "error",
"error_code": 400,
"error_message": "Missing required field: model",
"stream_id": "stream-1"
}Soniox TTS v1
Soniox TTS v1
Stream real-time speech synthesis from Soniox TTS v1 over WebSocket with low-latency incremental audio output and SLNG’s unified TTS protocol.
WSS
/
v1
/
tts
/
soniox
/
tts-rt:v1
Messages
{
"type": "init",
"stream_id": "stream-1",
"model": "tts-rt-v1",
"language": "en",
"voice": "Adrian",
"audio_format": "wav",
"sample_rate": 24000
}{
"type": "text",
"stream_id": "stream-1",
"text": "Hello from Soniox text-to-speech.",
"text_end": false
}{
"type": "clear",
"stream_id": "stream-1",
"cancel": true
}{
"type": "audio_chunk",
"audio": "UklGRiQAAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQAAAAA=",
"audio_end": false,
"stream_id": "stream-1"
}{
"type": "terminated",
"terminated": true,
"stream_id": "stream-1"
}{
"type": "error",
"error_code": 400,
"error_message": "Missing required field: model",
"stream_id": "stream-1"
}bearer
type:http
method
type:string
GET
headers
type:object
X-World-Part-Override
type:enum
Override target world part. Auto-selected if not provided.
Available options:
naConnection Config Message
type:object
Initialize a TTS stream. Sent once per stream_id before any text frames.
Text Streaming Message
type:object
Stream text incrementally to the active stream. Set text_end true on the final chunk.
Cancel Message
type:object
Cancel an in-flight stream. Server stops audio and terminates the stream.
Audio Response
type:object
Audio bytes for the stream chunk. audio_end true marks the final audio payload (stream not yet terminated).
Terminal Stream Event
type:object
Server has fully closed the stream and released resources. stream_id may now be reused.
Error Response
type:object
An error encountered on the stream. After an error the stream is typically terminated.
Was this page helpful?
⌘I