create a streaming session
mint a one-shot websocket session for real-time streaming synthesis. set audio_format here to negotiate opus, pcm, mulaw, alaw, or mp3; omit it for raw 24 khz mono signed 16-bit little-endian pcm. connect only to the returned ws_url, append ?token=<token>, and send a json synthesis frame. binary messages contain the negotiated audio stream and are followed by a terminal {"type":"done"} json frame. the returned token is single-use and expires in 300 seconds. on the socket, errors arrive as {"error": true, "code", "recoverable"} frames with no done after them: INVALID_TEXT (nothing to speak, not charged) and INVALID_MESSAGE (the frame was not a json object) are recoverable and the socket stays open.
Authorizations
your rumik api key, e.g. rk_live_.... create one in the rumik dashboard.
Body
text to synthesize. sent again in the websocket synthesis frame.
2000which model to use.
muga, mulberry optional output format for this one-shot session. omit the field for raw 24 khz mono signed 16-bit little-endian pcm. explicit null and unsupported values return 400 UNSUPPORTED_AUDIO_FORMAT.
opus, pcm, mulaw, alaw, mp3 Response
a one-shot websocket session.
websocket url to connect to.
"wss://silk-api.rumik.ai/ws/tts"
one-shot token. pass as ?token=<token> when connecting. single-use; expires after expires_in seconds.
id of this request. the socket's done and cancelled frames carry a request_id too.
seconds the token stays redeemable (300).
300