Skip to main content
WSS
method
type:string

GET

query
type:object
Append text
type:object

Add text to the server's buffer. Does not generate audio on its own.

Flush and generate
type:object

Synthesize everything currently buffered and stream the audio back. The session stays open. Flushing is what triggers generation.

End input
type:object

Signal that no more text is coming. The server flushes the remainder and finishes the session.

Segment started
type:object

A new audio segment is about to stream as binary frames.

Segment finished
type:object

The current segment has finished streaming. Carries the credits charged for this segment.

Session complete
type:object

All segments are complete. The server then closes the connection with code 1000.

Error
type:object

An error occurred. Terminal errors carry a code matching the WebSocket close code that follows.