Skip to content

tutorial

Chapter 9 of 10

Chapter 9 — Voice deep dive

by Rod Rivera Published

Tune Deepgram end-of-turn, format speech for TTS, and recover from ASR mistakes.

Goal

Treat voice as a first-class design surface — not a final demo pass.

End-of-turn (Flux)

Deepgram Flux models use model-integrated end-of-turn detection. In integrations.yml:

asr:
  name: deepgram
  language_map:
    en:
      model: flux-general-en
  eot_threshold: 0.7
  eot_timeout_ms: 5000
Parameter Effect
eot_threshold Confidence needed to end the turn (higher = wait for clearer completion)
eot_timeout_ms Maximum silence before forcing end-of-turn

Experiment: Lower eot_timeout_ms if Atlas waits too long after short answers. Raise it if booking references spoken with pauses get cut mid-way.

This tutorial uses Inspector only. Production telephony channels (SIP, CPaaS) reuse the same Skills; audio format negotiation differs by channel.

Spoken formatting

TTS reads characters poorly when you dump HT12345 as a single token. Instruct the skill to speak references character by character:

H T one two three four five

Put that rule in agent.yml persona and in skill bodies that read codes aloud.

Keep sentences short. Ask one clarifying question at a time. Those persona rules reduce barge-in pressure and cut TTS latency perception.

ASR recovery patterns

Speech recognition will mishear amounts, pins, and booking refs. Build recovery into skills:

  1. Confirm before side effectsrequires_confirmation with a response that reads the value back
  2. Re-ask on failure — tools return ok: false; instruct the skill to retry once
  3. Offer alternatives — list bookings instead of forcing the traveler to dictate a reference
  4. Handoff early — after repeated failures, @skill.human_handoff

Demo PIN and booking refs in make show-demo-data are chosen to be speakable.

Verbatim vs rephrase

Mechanism Use when
utter: + responses.yml Exact compliance / recording / legal wording
metadata.rephrase: true on a response Greeting can vary slightly while staying on-brand
Free LLM prose Normal conversation

For voice, prefer verbatim for anything a regulator or brand team would quote.

Inspector workflow

make inspect
  1. Enable the microphone
  2. Watch partial transcripts while speaking
  3. Compare text and voice behaviour — skills should work in both modes
  4. If ASR splits a booking ref, try speaking slower or use the typed channel to isolate Skills logic from speech

Talking point

Latency and turn-taking failures are voice-specific. Progressive control and short spoken utterances are the harness — not a bigger prompt.

Next

Chapter 10 — Coding agents and flywheel