Speech & turn-taking
Choose how your agent hears and speaks, and tune when it decides the caller has finished.
Two decisions here shape how a call feels: which speech pipeline the agent uses, and how patient it is about taking its turn.
{
"pipeline_mode": "cascaded",
"llm_provider_model_id": "LLM_MODEL_ID",
"stt_provider_model_id": "STT_MODEL_ID",
"tts_provider_model_id": "TTS_MODEL_ID",
"tts_voice_id": "VOICE_ID"
}Over the API: PATCH /v1/agents/{id}/draft.
Pick a pipeline
| Mode | How it works | Choose it when |
|---|---|---|
speech_model | The model hears audio and answers directly, without an intermediate transcript | You want to preserve the caller’s tone and use a speech model for the conversation |
cascaded | Transcribe, reason with a text model, then synthesize the reply | You want to pick the transcriber, the text model, and the voice independently |
Model and voice IDs come from your workspace's
catalog — never hardcode one. Set
speechlm_provider_model_id for a speech model, or the llm/stt/tts
trio plus tts_voice_id for cascaded.
Sending "" clears a selection.
Models and voice
Discover platform UUIDs from the model catalog.
Choose the displayed model and voice, then send each catalog entry’s id
in the corresponding draft field below.
| Field | Type | Meaning |
|---|---|---|
llm_provider_model_id | UUID or "" | Enabled LLM catalog model |
stt_provider_model_id | UUID or "" | Enabled STT catalog model |
tts_provider_model_id | UUID or "" | Enabled TTS catalog model |
tts_voice_id | UUID or "" | Enabled voice; must belong to the selected TTS model's provider |
speechlm_provider_model_id | UUID or "" | Enabled Speech model for the speech_model pipeline |
"" clears any selection; null is rejected — full clearing rules in
Editing the draft. Changing tts_provider_model_id or
tts_voice_id without resending tts_voice_settings clears the
previous voice override — resend explicit settings to keep them.
Voice settings
tts_voice_settings layers per-agent adjustments over the voice you picked —
speed, volume, stability, expressiveness, and similar. Which keys a given
voice accepts varies, so read the provider's voice_settings_schema from the
catalog rather than guessing.
{
"tts_voice_settings": {
"speed": 1.1,
"expressiveness": 0.7
}
}Send {} to drop back to the voice's defaults. Accent and dialect aren't
settings — they belong to the voice you choose, so filter the catalog for the
accent you want.
Help the transcriber hear your callers
On a cascaded pipeline, two settings make a real difference to accuracy.
Expected languages. List up to ten languages the caller might speak:
{
"stt_language_hints": [
"ar",
"en"
]
}Or fix a single language with stt_language. Set it to auto or multi to
detect per call.
Your vocabulary. Names, brands, and jargon a general transcriber will mangle:
{
"stt_vocabulary": {
"terms": [
"Kejue",
"Al Barsha",
"Takaful Plus"
],
"notes": "Insurance claims line; callers quote policy numbers like P-4200."
}
}Not every transcriber supports both. Read stt_capabilities on your selected
STT service in the model catalog. It gives you supported
languages, vocabulary limits, language-hint support, and turn-ending support.
Use those returned capabilities instead of looking up an engine type.
Vocabulary supports up to 1,000 terms of 200 characters, but the selected
service may publish tighter limits in vocabulary_limits. Language hints
must appear in that service's language list. Use null or {} to clear a
vocabulary, and [] to clear language hints.
If you set a vocabulary on a transcriber that can't use it, the save is rejected and tells you so. A vocabulary you already saved survives a switch — it's simply not used.
Turn-taking
When does the agent decide you've stopped talking? Defaults work for most calls; these are the knobs when they don't.
| Setting | Default | What it does |
|---|---|---|
turn_endpoint_delay_ms | 500 | How much silence ends the caller's turn |
endpointing_delay_ms | 330 | Minimum silence before we'll accept that the turn ended |
min_interruption_ms | 90 | How much speech counts as the caller interrupting |
min_turn_duration_ms | 50 | How much speech counts as a turn at all |
endpointing_mode | auto | Who decides the caller has finished: auto, stt, or audio (below) |
These live under behavior.turn_taking. The minimum endpointing delay must
not exceed turn_endpoint_delay_ms. Shorter delays feel snappier and
interrupt more; longer ones feel patient and add latency.
Who decides the turn has ended
endpointing_mode | What happens |
|---|---|
auto | We pick. On a cascaded pipeline whose transcriber reports stt_capabilities.endpointing.auto, the transcriber's own turn detection decides; otherwise the agent's end-of-turn model does |
stt | The transcriber's turn detection decides, when the selected service reports both stt_capabilities.endpointing.capable and .reliable |
audio | The agent's own end-of-turn model always decides, whatever the transcriber |
stt and the transcriber path of auto need a cascaded pipeline; a speech
model agent always uses the agent's model. When the transcriber decides, it
receives the same settings: it checks whether the turn is complete after
endpointing_delay_ms of silence and, when its end-of-turn model judges the
sentence unfinished, keeps listening up to turn_endpoint_delay_ms plus a
short margin before ending the turn anyway. Interruptions are detected on the agent in
either mode, so a caller can always talk over the agent.
The agent keeps listening alongside the transcriber. If the caller says something the transcriber's turn detection didn't register, typically a short, quiet reply like "yes" or "okay" on a noisy line, the agent ends that turn itself as soon as the caller stops. The transcriber then transcribes the reply from where it began, so it is answered without an extra wait.
When silence isn't the right signal
A caller dictating a phone number in groups, or trailing off mid-thought, clearly isn't finished — but the silence says otherwise. Instead of tuning milliseconds, tell the agent in prose when to keep listening:
{
"behavior": {
"wait_instruction": "If the caller is still mid-thought — dictating a number or address in groups, or trailing off before finishing a sentence — reply with exactly <WAIT/> and nothing else. Answer normally once they have finished.",
"wait_rearm_ms": 5000
}
}The caller never hears the tag; the agent just keeps listening, and judges
the next pause on the fuller sentence. wait_rearm_ms caps how long it will
hold before answering anyway (1,000–30,000 ms, default 5,000).
Background noise
A little ambience under the agent's voice makes a call sound less like a recording booth.
{
"behavior": {
"background_noise": {
"enabled": true,
"sound": "office",
"volume": 0.15
}
}
}Built-in sounds are office, keyboard, keyboard-soft, city, forest,
and crowded-room. Your workspace may have more: