glamorous-church-16794
04/08/2026, 9:41 PMtall-airline-16756
04/08/2026, 9:41 PMtall-airline-16756
04/08/2026, 9:41 PMglamorous-church-16794
04/08/2026, 9:45 PMtall-airline-16756
04/08/2026, 9:45 PMuser_started_speaking (or equivalent) fires.
• Hybrid: Run silence detection first for a quick heuristic, then pass a short audio snippet or call transcript to an LLM for a confidence score before taking action.
How to build it in LiveKit
1. Create a detection tool (example pattern):
◦ Implement a detect_voicemail tool/function that:
▪︎ Streams or samples early call audio.
▪︎ Runs silence detection logic (timer reset on speech events).
▪︎ Optionally sends audio/text to an LLM classifier for final decision.
▪︎ Returns structured output (e.g., { voicemail: true/false, confidence: 0.82, reason: "long_silence + LLM" }).
1. Integrate into your call flow:
◦ Run detect_voicemail immediately after answer.
◦ If voicemail is detected, trigger your custom handling: leave a message, hang up, route to voicemail box, or warm-transfer with voicemail_detected handling.
1. Use existing helpers:
◦ Use event listeners like user_started_speaking to reset silence timers.
◦ The agents framework examples and the WarmTransferTask indicate how voicemail state can be integrated into tasks and transfers.
Questions to narrow this for your use case
• Are you detecting voicemail for outbound calls only, or inbound as well?
• Which SDK/language and agent framework are you using?
• Do you want immediate hangup on detection, leave a message, or hand off to human agents?
If you tell me your platform and desired action on detection, I’ll give a compact code sketch and threshold recommendations for that stack.
Sources: How to detect and handle silence during calls | Agents Framework | livekit/livekit_composite | DeepWiki | examples/voice_agents | livekit/livekit_composite | DeepWiki | WarmTransferTask | LiveKit Documentation, with interactive elementsglamorous-church-16794
04/08/2026, 9:46 PMtall-airline-16756
04/08/2026, 9:46 PMdetect_voicemail tool that:
◦ watches for sustained silence (reset on user_started_speaking),
◦ optionally samples a short audio clip or transcript and runs an LLM/classifier,
◦ returns structured output (voicemail: true/false, confidence, reason).
• Integrate that tool into your call flow and use the existing hooks (e.g., WarmTransferTask’s voicemail_detected) to apply your custom handling (leave message, hang up, route, or transfer).
If you want, tell me:
• outbound vs inbound calls,
• which SDK/language you’re using, and
• the action you want on detection (hang up, record message, route to agent).
I’ll give a short code sketch and threshold recommendations for your stack.
, with interactive elements