Voice and omni-channel agents · L2 · 20 min
The voice loop
Learn in five minutes
- A voice turn is: hear, understand, decide, speak.
- Hearing and speaking are models or browsers of their own, not the language model.
- The Web Speech API is documented by MDN. The W3C draft should be confirmed. It is not enough to call it a Recommendation.
- Barge-in means the person speaks over the reply.
- The loop still has a tool cap.
If the browser both hears and speaks, the language model only sees text. Draw that split so you do not treat the microphone as the LLM.
Visual
Four boxes
- Mic to text.
- Text to the same agent loop as chat.
- Tool or refusal.
- Text to speech.
- Label the speech boxes as separate from the language model.
Quiz
Ecosystem
- Barge-in
- The person starts speaking while the assistant is still talking.
Sisters: Web Speech API, Turn-taking, Queues, CRM notes.
The retrieval index and the tool cap are shared. The channel changes the wait and the consent copy.
A later host could add a channel without rewriting the notes server.
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.
Sources and go deeper
- MDN Web Docs, Web Speech API community last checked 2026-10
- Web Speech API community draft community last checked 2026-10
- W3C /TR/speech-api/ spec confirm This URL returned 404 on 2026-10. The community draft above is the page that opened. last checked 2026-10
- Speech synthesis — Wikipedia wikipedia last checked 2026-10
- Speech recognition — Wikipedia wikipedia last checked 2026-10