Understand the difference between a persistent realtime session and a single generation request.
1. Bidirectional interaction
A live session exchanges input and output over a continuing connection. Your app must coordinate sending, receiving and playback concurrently; a one-shot HTTP loading flag is insufficient.
2. Model capability selection
Choose a currently supported Live model and supported client route. Audio formats, session limits and feature combinations are model-specific; record them instead of assuming ordinary generation settings apply.
3. Session ownership
Give one component ownership of connection, capture and playback. Expose a finite set of UI states such as connecting, listening, responding and disconnected.
Worked scenario
The socket connects successfully but the microphone is denied. The session is connected, not listening; the UI must communicate that distinction.
Apply it
Draw the session state machine including permission denial, connection failure and user stop.
Check your understanding
Your design separates connection state from microphone and playback state. Explain the decision and show evidence from your implementation or design. If you cannot demonstrate it yet, revisit the relevant section before continuing.