How to make voice agent conversations feel natural: turn-taking, barge-in and spoken style
What makes a realtime voice agent feel human: endpointing, barge-in, echo handling, remembering only what was heard, spoken-style answers, and filling silence.
Low latency is necessary for a good voice agent, but it isn’t enough. An agent can answer in 800 ms and still feel like a machine: it talks over you, ignores your “no, wait”, reads out bullet points, or goes silent while it looks something up. What makes a conversation feel real is mostly the behaviour around the words. This article collects what we’ve learned building on the Moses speech-to-text and text-to-speech APIs. (For the timing itself, read where the milliseconds go first.)
Turn-taking: knowing when it’s your turn
People don’t wait for silence to know someone has finished; they predict it from intonation, grammar and context. A voice agent has a simpler tool: the endpoint, the length of silence that ends an utterance. It is the most important dial you have:
- Too long, and every answer starts with an awkward pause.
- Too short, and the agent jumps in while people are thinking, answering half a sentence.
The fix is to change it with the conversation. After a yes/no question, use 100–200 ms. After “What can I help you with?”, use 400–500 ms. While someone dictates a phone number, longer still. Moses STT lets you set the pause per stream and change it during the conversation. Partial transcripts arrive while the user speaks, so your app can show live captions and your agent can get ready.
Barge-in: stop talking when the user starts
Interrupting is normal in conversation, and a voice agent that keeps talking over “no, the other one” is maddening. Barge-in needs three things to happen within a fraction of a second:
- Detect that the user started speaking. Moses STT signals the start of speech right away, without waiting for the transcript.
- Stop the audio at once. Moses TTS can cancel an answer mid-sentence, so playback stops immediately.
- Abort the language model’s answer, so it doesn’t keep generating text nobody will hear, and so the next turn starts fresh.
Don’t let the agent interrupt itself
On a laptop or phone speaker, the microphone hears the agent too. Without care, the agent interrupts itself. Use the echo cancellation and noise suppression that browsers and phones provide, and make sure the agent’s own voice can’t be mistaken for the user starting to speak. The Moses JavaScript clients take care of the microphone settings for you.
Remember only what the user heard
This is the most common subtle bug. The model planned a three-sentence answer; the user interrupted after the first. If the full answer goes into the conversation history, the agent will later act as if the user heard things they never did. Keep track of what was actually played, and on an interruption keep only that part in the history, marked as interrupted. Moses TTS reports which part of the answer it is speaking, which makes this straightforward.
Write for the ear, not the eye
A voice prompt is not a chat prompt. Give the voice turn its own instructions:
- One or two short sentences per turn. Long answers can’t be skimmed and are hard to interrupt politely.
- One question at a time. “Which day suits you, and morning or afternoon?” becomes two turns.
- No lists, tables, links or formatting. Even when the formatting itself isn’t read out, the structure behind it sounds wrong when spoken.
- Spell out what listeners can’t see. Confirm numbers back, offer to repeat, say what you’re doing.
- Don’t invent. Saying “I’m not sure, let me check” sounds more human than a confident wrong answer.
Get numbers, names and abbreviations right
Nothing breaks the illusion faster than “forty-two point zero zero E U R”. Moses TTS reads numbers, dates, times, currencies, units and abbreviations as words, in each of its seven languages. Beyond that, it helps to:
- give your own pronunciations for product, company and people’s names;
- decide whether your audience spells an abbreviation out or says it as a word;
- add a deliberate pause where a person would take a breath, and mark foreign names in a sentence so they are pronounced correctly.
No dead air
Silence on a call means “something is wrong”. Waits are sometimes unavoidable, for a database lookup or a question to a colleague, so fill them:
- Acknowledge first. Say “Let me check that for you” before the lookup starts, not after.
- Keep the first sentence short so speech starts while the model is still writing.
- Hand slow work to a background agent and keep talking: the voice agent says it will check, carries on with the next point, and brings the answer in when it arrives.
Silence, goodbyes and hang-ups
A real conversation also ends well. Handle the edges with fixed lines instead of model calls, which is faster and costs nothing:
- After a while without speech, ask whether the person is still there; if the silence continues, say goodbye and end the call.
- When the goal is reached: confirm it in one sentence, say goodbye, then end. An agent that can’t end a call will talk forever.
- Set hard limits on minutes and turns, with a polite wrap-up shortly before them.
- When the browser tab closes or the connection drops, end the call properly, so nothing keeps running.
Handle corrections gracefully
Speech recognition sometimes revises itself. When you tell Moses STT which language to expect, it corrects very short utterances that were misheard as another language and sends the corrected text shortly after. Replace the earlier text in your history. If the agent already answered, a short “Sorry, I misheard you” is better than carrying on with the wrong word.
A checklist for natural voice agents
- Streaming speech to text with live partial results and a start-of-speech signal; a pause length that fits each question.
- Streaming text to speech that starts speaking while the answer is still being written.
- Barge-in: when the user starts speaking, the agent stops talking and stops writing.
- Echo cancellation, so the agent never interrupts itself.
- History contains only what was actually spoken.
- A voice-specific prompt: short, one question, no lists, honest.
- Numbers, names and abbreviations pronounced correctly.
- Acknowledgements before waits; fixed lines for silence and goodbyes; limits on length.
If you’d rather not wire all of this yourself, a Moses agent can take the call: its voice sub-agent already handles turn-taking, barge-in, spoken waits, silence and limits, on the same STT and TTS APIs.
Frequently asked questions
What is barge-in in a voice agent?
Barge-in means the user can interrupt the agent while it is speaking, and the agent stops at once and listens, the way people do in conversation. It needs a speech-start event from speech to text and a cancel command in text to speech that stops audio immediately.
What is endpointing in speech recognition?
Endpointing is deciding when a speaker has finished an utterance, usually by waiting for a short silence. A shorter endpoint makes a voice agent answer faster; a longer one cuts people off less often when they pause to think.
How do I stop a voice agent from hearing itself?
Use echo cancellation on the microphone (browsers provide it with getUserMedia), ignore speech starts that coincide with the agent's own audio unless the microphone level is clearly above it, and end the current utterance when the agent stops speaking so echo doesn't merge into the user's next sentence.
Should a voice agent use the same prompt as a chatbot?
No. Spoken answers must be short, avoid lists, tables and markdown, ask one question at a time, and spell out what a listener can't see. A dedicated voice prompt with a small, stable context also keeps the language model fast.
Which Moses APIs help build a natural voice agent?
Moses STT streams partial and final transcripts, signals when someone starts and stops speaking, and lets you adjust the end-of-speech pause. Moses TTS speaks a language model's answer while it is being written, stops instantly for barge-in, reports what it is speaking, reads numbers and dates naturally, and takes your own pronunciations.
Try the realtime voice APIs
Streaming speech to text and text to speech for voice agents, hosted in Germany, with no audio stored. Try both in your browser with an API key.
Open the live example