When using the real-time WebSocket APIs (Documentation Index
Fetch the complete documentation index at: https://docs.gradium.ai/llms.txt
Use this file to discover all available pages before exploring further.
tts_realtime or
stt_realtime), two parameters control how the connection initialises.
Both work identically across TTS and STT.
send_setup_on_start
Controls whether the setup message is automatically sent when the
context manager is entered. Defaults to True.
Set this to False when you need to send setup manually, for example
when using multiplexing where each request has
its own setup with a unique client_req_id.
wait_for_ready_on_start
Controls whether the client blocks waiting for the server’s ready
message after sending setup. Defaults to False.
When set to False, the ready message is captured lazily during the
normal receive loop. This reduces connection latency since you can
start sending data immediately after setup without waiting for a
round-trip.
When set to True, stream.ready is guaranteed to be populated before
you start sending data, which can be useful if you need
server-provided metadata (like sample rate) before proceeding.
stt_realtime: