Skip to main content
You tell the model when the user is done speaking by sending finalize. This can come from a user releasing a push-to-talk button, or from your own voice activity detection (VAD). Transcript events are deltas — concatenate text from is_final events (without stripping whitespace) to assemble the full transcript.
Generates complete sentences and calls finalize after each one.In a real voice agent, you wouldn’t know where sentence boundaries are ahead of time and would only call finalize when the user is done speaking.
From cartesia-python/examples/examples.py:746

Run this example