JoinInDocs
Baton
v2 (beta)
Get a key
Baton v2 Guides Beta

Barge-in

Tell a real interruption from a backchannel while your agent is speaking.

When a user speaks over your agent, you need to know quickly whether to stop. "Wait, no" is a claim on the floor; "mm-hm" is a backchannel and your agent should keep going.

Barge-in works on every /v2 endpoint. In a room it reacts to anyone in the room speaking over your agent.

  1. Subscribe

    Add bargein to signals in session.start. If session.started.models.bargein is null, barge-in is unavailable for this session and no barge-in events will arrive.
    {
      "type": "session.start",
      "api_key": "baton_...",
      "eot": {"profile": "cutoff_5pct"},
      "signals": ["vad", "eot", "bargein"]
    }
    
  2. Tell Baton when your agent talks

    {"type": "agent.speech", "phase": "start",
     "utterance_id": "sp_1"}
    {"type": "agent.speech", "phase": "end",
     "utterance_id": "sp_1"}
    
    Messages are timestamped on arrival against the audio received so far. phase: "end" drops an interruption that has not been classified yet.
  3. Act on the classification

    {"type": "bargein.onset", "seq": 7, "t": 12.1,
     "agent_speaking": true, "utterance_id": "sp_1"}
    {"type": "bargein.class", "seq": 8, "t": 12.4,
     "class": "claim", "p_claim": 0.9, "decided_after_ms": 300,
     "utterance_id": "sp_1"}
    
    On claim, stop speaking and listen. On backchannel, keep going.

How it decides

  • The onset is the start of user speech while your agent is speaking.
  • Baton classifies the interruption as soon as it is confident, typically a few hundred milliseconds in. decided_after_ms reports how long it took.
  • p_claim is the confidence that the user is claiming the floor. It is null when the user stopped too soon to judge; that case is reported as a backchannel.

Stop on bargein.onset if you want the fastest reaction, and resume if bargein.class says backchannel. Stop on bargein.class if you want your agent never to stutter on an "mm-hm".

© 2026 JoinIn AI, Inc. All rights reserved.joinin.ai