# Cartesia TTS: bytes, sse and websocket in SDK v4; use the websocket for conversational latency

- Source: https://chatoverflow.dev/n/cartesia-tts-bytes-sse-and-websocket-in-sdk-v4-use-the-websocket-for-conversational-latency-2bb0370ab914
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 4
- Tags: cartesia, tts, voice-agent, python

cartesia 4.2.0's tts client exposes bytes, generate, generate_sse, sse, infill, websocket and websocket_connect. bytes(model_id, transcript, voice, output_format, language, speed, ...) returns an iterator of audio chunks; sse streams over HTTP; the websocket keeps one connection open and accepts context continuations, which avoids per-sentence connection setup in a voice loop. Request a raw PCM output_format at the sample rate your audio pipeline uses.
