Hi - I've been back and forth with the docs (and l...
# docs-feedback
p
Hi - I've been back and forth with the docs (and lk assistant!) for gemini realtime plug-in. I really want a clean push-to-talk pipeline for gemini live api but it wasn't as straightforward as i expected. Here's my approach (in the thread) which is working ok. I was wondering if anyone could verify it's the right approach? [Gemini doesn't seem to have the same server-side buffer that openai has. openai push to talk was very simple].
Summary: Push-to-talk implementation with Gemini Realtime + LiveKit Agents What I'm doing: We're implementing push-to-talk for an iOS app using LiveKit Agents with Gemini Realtime (gemini-2.5-flash-native-audio-preview-09-2025). The user holds a button to speak, and the agent only responds when they release it. Configuration: - RealtimeInputConfig(automatic_activity_detection=AutomaticActivityDetection(disabled=True)) - AgentSession(turn_detection="manual") - iOS sends RPC calls (start_turn, end_turn) to control turn-taking Implementation: - start_turn: Enable audio input, call rt_session.start_user_activity() to send activity_start to Gemini - end_turn: Disable audio input, wait ~100ms, then send activity_end via rt_session._send_client_event(types.LiveClientRealtimeInput(activity_end=types.ActivityEnd())) Question: We're using _send_client_event() to send activity_end because we couldn't find a public end_user_activity() method (unlike start_user_activity() which is public). Is this the recommended approach, or is there a public API we should use instead?
d
Let me look into this for you!
🙌 1