CypherMonkeyAI omni-channel lab

A lifelong-learner lab on AI omni-channel agents, including voice and the contact center. Free to read. Nothing sold.

Voice AI agent stack · L1 · 20 min

Turn-taking and barge-in

Learn in five minutes

  • LiveKit's turns page says turn detection decides when the user has finished speaking and when they start speaking while the agent is talking.
  • That page says most techniques use voice activity detection, then endpointing to decide the end of a phrase.
  • The same page describes adaptive interruption handling as a way to separate a real interruption from backchanneling.
  • The xAI Speech to Speech page says turn_detection.type set to server_vad detects when the user has finished speaking.
  • That page also says to enable server_vad for automatic barge-in, and that item.interruptible set to false drops caller audio until playback completes.

Barge-in in this lab means the person speaks while the reply is still playing. Copy the field name from the page you opened. Do not invent a silence timer.

This section HTML

Visual

T9-R2 diagram

Diagram SVGDiagram PNGDiagram HTML

Flow SVGFlow PNGFlow HTML

Two ways to yield

  1. Write the LiveKit sentence: the agent can yield when the user starts speaking mid-response.
  2. Write the xAI sample field: turn_detection.type is server_vad.
  3. Write the xAI field that drops caller audio: item.interruptible false.
  4. Label each line with the page it came from.

This section HTML

Quiz

What does LiveKit's turns page say turn detection decides?

Those are the two decisions on that page.

Which xAI field does the Speech to Speech page tie to automatic barge-in?

The recommendations line says to enable server_vad for that.

What does item.interruptible false do, on that page?

The session table says caller audio is dropped until playback completes.

This section HTML

Ecosystem

Barge-in
The person speaks while the assistant is still talking. Vendors name the detector differently.

Sisters: Speech-to-text, Language model, Text-to-speech, WebRTC, SIP.

A cascaded pipeline and a speech-to-speech model are two shapes the LiveKit docs name. The xAI Speech to Speech API is a hosted speech-to-speech session.

Pin the model id, the voice, and the date you read the docs.

Config

  • Write the goal in one sentence.
  • Name the input and the allowed output.
  • Save the trace next to the result.

Troubleshooting

  • The answer looks fluent and is wrong. Check whether a source passage actually contains the claim.
  • The loop never stops. Set a step cap and stop when the tool result repeats.

This section HTML

Sources HTML

Sources and go deeper

sources.json