lemon-flower-9911
10/29/2025, 9:09 AMdef log_all_events(event_name: str, *args, **kwargs):
logger.info(f"🔔 EVENT FIRED: {event_name}, args count: {len(args)}")
if args:
logger.info(f" First arg type: {type(args[0])}")
if original_emit:
return original_emit(event_name, *args, **kwargs)
if hasattr(session, '_event_emitter'):
session._event_emitter.emit = log_all_eventstall-airline-16756
10/29/2025, 9:09 AMtall-airline-16756
10/29/2025, 9:09 AMinput_speech_started and input_speech_stopped events. These handy events are triggered by the server-side Voice Activity Detection (VAD) and are tailored specifically for Gemini Live integrations.
Here’s a simple example to help you listen to these events in your code:
@session.on("input_speech_started")
def on_input_speech_started():
print("User started speaking")
@session.on("input_speech_stopped")
def on_input_speech_stopped():
print("User stopped speaking")
Just a quick tip: make sure your session object is properly initialized and these event handlers are registered correctly so you can capture the events smoothly during your session. If you need any more help with this, feel free to ask—I’m here to help!
Sources: Agent Session & Client Integration | livekit/livekit_composite | DeepWiki | Agents v0.x migration guide - Python | LiveKit Docs | Agents v0.x migration guide - Node.js | LiveKit Docs