Mirage Academy · Voice AI & Real-Time Conversational Agents

Real-time voice agents course: build an assistant that talks back

Voice AI & Real-Time Conversational Agents is an advanced course for software engineers and technical product people who build AI features. Eight chapters and forty lessons take you from the speech pipeline to a voice assistant that completes a task, interruptions included.

Open the courseSee the audio math

One loop

A voice agent runs one loop: it listens, reasons, acts and speaks

The video of about a minute comes first. Under it, the loop it describes in four stops.

Still from the intro video for the course Voice AI & Real-Time Conversational Agents
Intro video, 1 min 12 s. Transcript below.
Read the transcript

You have an assistant that works in text, and now people want to talk to it. Out loud, the hard parts change: delays feel long, users interrupt, and a tool call cannot leave silence. This course is for developers who need that to work. A voice agent runs one loop. It listens, turning speech into text. It reasons about what was said. It acts, calling tools and keeping state. Then it speaks, and keeps listening in case the user cuts in. Each hard part has its own chapter. Recognition and synthesis come first. Then turn-taking and latency budgets, so the agent knows when to talk. Then tools, state and real-time streaming. Finally, testing, so you can tell whether it actually works. The capstone ties it together: a voice assistant that completes a real task, interruptions included. If you want to build one, start with the first chapter on the speech pipeline.

  1. Listen

    It listens, turning speech into text.

  2. Reason

    It reasons about what was said.

  3. Act

    It acts, calling tools and keeping state.

  4. Speak

    It speaks, and keeps listening in case the user cuts in.

The course video, then four stops in a row: listen, reason, act and speak. A dotted line runs from the last stop back to the first.

Voice AI course: testing voice agents at Mirage →

Chapter 1

How voice agents work: start with the arithmetic of raw audio

Chapter 1 opens the speech pipeline. The calculator below works through one of its lessons with example values.

Raw audio calculator

Example, common values
Sample rate
Bit depth
Channels
Frame length
  • Per second

    32,000 bytes

  • Per minute

    1,920,000 bytes

  • Bit rate

    256 kbit/s

A frame of 20 ms holds 640 bytes, 320 samples per channel. 50 frames per second.

That is 1 times a 16 kHz, 16 bit, mono stream.

The rule: raw audio is a count of samples. Bytes per second = sample rate x bytes per sample x channels, and bytes per sample = bit depth divided by 8. A frame is a slice of a few milliseconds: its bytes = bytes per second x milliseconds / 1000. This is the raw stream before any codec.

32,000 Per second. 1,920,000 Per minute. 640 bytes.

  1. Cascaded vs speech-to-speech agents

    The first lesson sets the two designs side by side.

  2. Raw audio arithmetic

    The calculator above is this lesson's kind of sum.

  3. Latency budgets and reading turn logs

    The third lesson is about latency budgets and about reading turn logs.

  4. Writing replies for the ear

    A reply is written to be heard.

  5. Measuring recognition with WER and common mistakes

    The chapter closes on word error rate and the mistakes people make with it.

A calculator with four choices: sample rate, bit depth, mono or stereo, and frame length. It shows the bytes per second, per minute and per frame, and a bar for the frame.

Chapter 2

Speech recognition: accuracy, latency and languages

Chapter 2 starts with word error rate. The example below counts one.

Example, made-up sentence
  1. saidbookheardbookright
  2. saidaheardaright
  3. saidtableheardcablewrong word
  4. saidforheardforright
  5. saidtwoheardtworight
  6. saidatheard missed
  7. saidsevenheardsevenright

Word error rate: 28.6 percent (1 substituted, 1 missed, 0 added, 7 words said)

The rule: word error rate = (substitutions + deletions + insertions) divided by the number of words in the reference, as a percentage.

  1. Word error rate

    The chapter starts with this measure.

  2. Model sizes and speed

    Model size and speed are one lesson.

  3. Batch versus streaming

    Recognition can run in batch or as a stream.

  4. Languages and conditions

    Languages and conditions get their own lesson.

  5. Names, numbers and read-back

    The last lesson covers names, numbers and read-back.

A sentence of seven words above and the words a recognizer heard below, matched in columns. One word is wrong and one is missing. Under the columns the page counts the errors and the rate.

Chapter 3

Speech synthesis and voice design

Chapter 3 is about the other direction, from text to sound. Text normalization is one of its lessons.

Example, made-up lines
  1. writtenDr. LeespokenDoctor Lee
  2. written3:45 pmspokenthree forty five p m
  3. written2 Main St.spokentwo Main Street

first chunksound

Picture, not a measurement
  1. How synthesis works

    This lesson explains how synthesis works.

  2. Text normalisation

    Normalizing written text is a lesson of its own.

  3. Latency of synthesis

    Synthesis has a latency of its own.

  4. Voice design

    Voice design is a lesson of this chapter.

  5. Consent and disclosure

    The chapter ends with consent and disclosure.

Three rows with written text on the left and the way it is spoken on the right. Under them a strip of dotted sound bars whose first chunk is lit.

Chapter 4

Turn-taking, interruptions and latency budgets

Chapter 4 is about when the agent talks and when it stops.

caller cuts in, agent stopsdashed box: echo

Picture, not a measurement
  1. Endpointing

    The first lesson is endpointing.

  2. Barge-in

    Second comes barge-in.

  3. Backchannels and echo

    Backchannels and echo follow.

  4. Latency budgets

    The chapter returns to latency budgets.

  5. Measuring response gaps

    It ends on measuring response gaps.

Two lanes on one time line. The caller speaks, a response gap follows, the agent speaks, and the caller cuts in so the agent stops. A dashed box on the caller lane marks echo.

Chapter 5

Tools and state in conversation

Chapter 5 covers what happens while the agent calls a tool and what it remembers.

Example, made-up booking
  • DayFridayconfirmed
  • Time7 pmheard, not confirmed
  • Party size…still empty

Tool call: check_availabilitycaller waiting

agent says meanwhileOne moment, I am checking that.

A retry carries the same key: request 1042

  1. Calling tools while someone waits

    The first lesson is about calling tools while someone waits.

  2. Slots and dialogue state

    Slots and dialogue state are one lesson.

  3. Confirmation strategies

    Confirmation strategies are the third lesson.

  4. Retries and idempotency

    Retries and idempotency come after that.

  5. Long calls and memory

    The chapter ends with long calls and memory.

Three slots of a booking: one confirmed, one heard but not yet confirmed, one empty. Below them a tool call in flight with a short line the agent says while the caller waits, and a retry key.

Chapter 6

Real-time transport: streaming and WebRTC basics

Chapter 6 follows the sound across the network.

  1. Microphone
  2. Encoder
  3. Network
  4. Jitter buffer
  5. Decoder
  6. Speaker

packetsone lostone latebuffer smooths timing

Picture, not a measurement
  1. Choosing a transport

    The first lesson is choosing a transport.

  2. Codecs and bitrate

    Codecs and bitrate are one lesson.

  3. Jitter and loss

    Jitter and loss sit in the middle of the chapter.

  4. WebRTC building blocks

    Then come the WebRTC building blocks.

  5. Scaling calls

    The chapter ends with scaling calls.

Six stages in a row from microphone to speaker. Under them a lane of twelve packets: one is lost, shown as a dashed ring with a cross, and one arrives late, shown lower in amber.

Chapter 7

Testing and evaluating voice agents

Chapter 7 covers testing and evaluating voice agents. The table below is an example run.

Example run, made-up numbers
CallTask doneSlots rightResponse gap
Call 1yes3/3640 ms
Call 2yes3/3720 ms
Call 3no1/31380 ms
Call 4yes3/3910 ms
Call 5no2/3760 ms
Call 6yes3/3780 ms

4 of 6 calls completed the task.

15 of 18 slots were right.

4 of 6 response gaps stayed within 800 ms.

  1. Task success

    The first lesson is task success.

  2. Slot and entity accuracy

    Slot and entity accuracy are the second lesson.

  3. Latency in tests

    Latency in tests is the third lesson.

  4. Scripted regression tests

    Scripted regression tests are one lesson.

  5. Uncertainty and monitoring

    The chapter closes with uncertainty and monitoring.

A table of six scripted calls. For each call it shows whether the task was completed, how many slots were right and whether the response gap stayed within 800 ms. Under the table the page counts the totals.

Next: measuring latency and conversation quality →

Capstone

The capstone: a voice assistant that completes a task

You end the course with the assistant itself, in five lessons from the brief to the launch gate.

  1. Step 1: Brief to load

    The first capstone lesson takes the brief and loads it.

  2. Step 2: Close the latency gap

    Next you close the latency gap.

  3. Step 3: Dialogue and confirmation

    Third, you build the dialogue and its confirmations.

  4. Step 4: Score the test run

    Fourth, you score the test run.

  5. Step 5: Launch gate

    The last lesson is the launch gate.

Five steps rising from left to right: the brief, the latency gap, dialogue and confirmation, scoring the test run and the launch gate. After the last step a go and a stop mark.

Start

How the Academy teaches it, and what you need to begin

Lessons are in English, and the level is advanced.

Level and audienceAdvancedAimed at engineers and technical product people who build AI features

LanguageLessons are in English.

Browse all courses
Open the course: Voice AI & Real-Time Conversational Agents

In the Academy

  1. Lessons

    A lesson pairs a short visual explainer with questions, a task and a quiz.

  2. Chapter checks

    You pass the chapter checks on the way to your certificate.

  3. AI coach

    You talk to the coach in a voice session. It asks you to explain a lesson in your own words, and asks again where your answer is thin. It has no say in the certificate.

  4. Certificate

    This course comes with a certificate that fixed rules grant. A verification code lets others check it online. Mirage issues it, and it carries no state recognition.

Lessons, chapter checks, the AI coach and the certificate are the four Academy stations shown. A box next to them gives the level, the audience and the language.

Guide to the AI engineer career path →

Questions about the course

  • What is the Voice AI & Real-Time Conversational Agents course?

    It is an advanced course in the Mirage Academy catalogue with eight chapters and forty lessons. It teaches how to build a voice assistant that listens, reasons, calls tools and answers naturally, with interruptions.

  • Who is this real-time voice agents course for?

    The catalogue names software engineers and technical product people who build AI features. Its level is advanced.

  • What does the realtime capstone deliver?

    A voice assistant that completes a task. The capstone lessons are brief to load, close the latency gap, dialogue and confirmation, score the test run and launch gate.

  • Which topics does it cover?

    The speech pipeline, speech recognition, speech synthesis and voice design, turn-taking, interruptions and latency budgets, tools and state in conversation, real-time transport with streaming and WebRTC basics, and testing and evaluating voice agents.

  • How is it different from the voice agent evaluation course?

    This course builds a voice agent from the speech pipeline up. The evaluation course is for people who already have one and need to measure its latency and conversation quality, and it sits at the Masters level.

  • How is it different from the Voice AI course page?

    That page explains how Mirage tests its own voice agents. Here you get the eight chapters, the forty lessons and the capstone of the course.

  • Do I get a certificate?

    This course comes with a certificate, and its verification code lets anyone check it online. The legal text adds that, depending on the course and on how you went through it, you get a certificate or a confirmation of participation. The AI coach plays no part in that decision.

  • Which language is the course in?

    The lessons are in English.