tts
Real-time text-to-speech synthesis channel.
Handshake
WSS
wss://tts.api.kotobatech.ai/v2/tts/ws
Authentication
AuthorizationBearer
Bearer-token authentication. Send the API key in the
Authorization: Bearer <api_key> header during the WebSocket
handshake.
Send
clientOpenSession
First frame after the WebSocket handshake. Selects the language and speaker for all responses sent on this connection.
OR
clientCreateResponse
Send the full text in a single frame. The server streams audio
chunks back until it emits audio.chunk with isFinal=true
followed by response.done. Only one response can be active at
a time per connection.
OR
clientCancelResponse
Aborts the currently active response. The server replies with
response.done carrying status: "cancelled".
Receive
serverReceiveEvents
Receives session creation, response lifecycle markers, audio chunks, and terminal status frames.
OR
serverReceiveEvents
Receives session creation, response lifecycle markers, audio chunks, and terminal status frames.
OR
serverReceiveEvents
Receives session creation, response lifecycle markers, audio chunks, and terminal status frames.
OR
serverReceiveEvents
Receives session creation, response lifecycle markers, audio chunks, and terminal status frames.
OR
serverReceiveEvents
Receives session creation, response lifecycle markers, audio chunks, and terminal status frames.
OR
serverReceiveEvents
Receives session creation, response lifecycle markers, audio chunks, and terminal status frames.