aloof-scooter-47164
12/07/2025, 8:18 PMtall-airline-16756
12/07/2025, 8:18 PMtall-airline-16756
12/07/2025, 8:18 PMuser_state_changed with new_state = "speaking" only when VAD detects actual speech. The Instant Connect feature still relies on real microphone audio and cannot force the speaking state without real audio.
If your goal is to show the agent that the user is "available" or to trigger UI behavior on connection, tell me what UX you want (e.g., show an "agent connecting" indicator, pre-fill a speaking badge, or play a sound). I can suggest alternative approaches you can implement client-side.
Sources: Events and error handling | LiveKit docs | Turn detection and interruptions | LiveKit Docs | Agent speech and audio | LiveKit docsaloof-scooter-47164
12/07/2025, 8:19 PMtall-airline-16756
12/07/2025, 8:19 PMspeaking when actual speech is detected. However, you can achieve the same UX effect with client-side alternatives:
• Show a provisional UI state (e.g., display a speaking badge, highlight the participant, or show “agent connecting — user speaking”) until VAD reports speaking.
• Emit a custom presence/metadata flag from your server or client at connection (for example, set user.metadata.initialState = "speaking"), and have clients use that to show the speaking UI independently of VAD.
• Play a short pre-recorded or silent audio buffer on connect (if appropriate) to trigger VAD quickly; note this still depends on actual audio being captured and may not always behave like true speech.
Which approach sounds best for your product needs — a UI-only visual change, a metadata flag, or trying the audio-buffer option? I can provide implementation tips for the option you choose.aloof-scooter-47164
12/07/2025, 8:21 PMtall-airline-16756
12/07/2025, 8:21 PM