Lesson 5 of 5

A voice assistant taken apart

Chain speech recognition, a chat model, and text to speech, and you have a voice assistant. Run all three on your device, time each stage, follow a mistake through, and compare end-to-end speech models.

Advanced20 min

Builds on Speech to text, Text to speech, and How a chat assistant works (Transformers and LLMs)

In this lesson you will

  • Describe a cascaded voice assistant and what passes between its stages
  • Measure where the wait before an answer comes from, and why the waits add up
  • Follow an early mistake through to the final answer
  • Contrast a cascade with end-to-end speech models, from their published descriptions

You have met each part already. Speech to text turned speech into words with Whisper, How a chat assistant works answered messages with an instruction-tuned SmolLM2, and Text to speech read text aloud with Supertonic. Put them in a row and you have a voice assistant. This lesson does exactly that, on your device, and times every step.

Three models in a row

A cascaded assistant is a pipeline:

  1. Hear. Whisper base.en turns the recorded question into text.
  2. Write. SmolLM2-135M-Instruct reads that text in its chat template, after a short system prompt (“You are a helpful voice assistant. Reply in one short spoken sentence.”), and writes a reply.
  3. Speak. Supertonic 2 reads the reply aloud, after the lab strips Markdown such as **bold** that the model sometimes writes.

A fourth step is only for measuring: Whisper listens to the spoken answer, so you can see what the speech stage lost.

Each stage starts when the one before it has finished, and each hands on nothing but text. Those two facts explain most of what you are about to see.

A voice assistant taken apart

Three separate models in a row: one hears your question, one writes an answer, one speaks it.

Running your own question needs all three downloads below; until then each stage shows what the real models did with the bundled questions.

  1. 1. HearWhisper base.en

    Recorded from Whisper base.en

    Loading the model's recorded outputs for the five spoken questions, clean and in noise.

    About the download

    Hear the question as text. This uses Whisper base.en, a 74-million-parameter English speech recognition model from OpenAI (2022), which turns speech into text.

    The first time, your browser downloads about 80 MB of model files from Hugging Face, plus a 14 MB runtime from this site. Both are cached for later visits. Everything runs on your device; nothing you record is sent anywhere.

    Manage downloads

    Loading the recorded results

  2. 2. WriteSmolLM2-135M-Instruct

    Recorded from SmolLM2-135M-Instruct

    Loading the model's recorded outputs for the five spoken questions, clean and in noise.

    About the download

    Write an answer to the question Whisper heard. This uses SmolLM2-135M-Instruct, the chat version of SmolLM2-135M from Hugging Face (2024): the same 135 million parameters, fine-tuned on about 460,000 example conversations and then preference-tuned, run from its original weights by this site's own engine.

    The first time, your browser downloads about 272 MB of model files from Hugging Face. They are cached for later visits. Everything runs on your device; nothing you type is sent anywhere.

    Manage downloads

    Loading the recorded results

  3. 3. SpeakSupertonic 2

    Recorded from Supertonic 2

    Loading the model's recorded outputs for the answers to the five spoken questions.

    About the download

    Speak the answer. This uses Supertonic 2, a 66-million-parameter text-to-speech model from Supertone (2026) that turns text into a voice by refining random noise in a few steps.

    The first time, your browser downloads about 263 MB of model files from Hugging Face, plus a 14 MB runtime from this site. Both are cached for later visits. Everything runs on your device; nothing you type is sent anywhere.

    Manage downloads

    Loading the recorded results

  4. 4. Check Whisper base.en again

    Hears in the spoken answer

Spoken question
Background noise
Silence before the answern/a
Whisper's word error raten/a
Answer lengthn/a
Round trip error raten/a

Challenges

0 of 3 complete

  1. Add noise and find the question whose answer changes because Whisper misheard it. (not yet)
  2. Find an answer that comes back different when Whisper listens to the spoken reply. (not yet)
  3. Ask something no amount of good hearing or speaking can answer. (not yet)

Try this

  • Ask who wrote Pride and Prejudice, then turn the noise up to as loud as the voice.
  • Ask how many legs a spider has, and compare stage 3’s text with what stage 4 heard.
  • Ask what time it is.
  • Read the time line under each question: which stage takes longest, and is it always the same one?
  • With all three downloads, ask your own question out loud.

What you saw

The waits add up. On the laptop the recordings were made on, with every model on the CPU, the silence between the end of a question and the start of its answer was about 2.5 to 5 seconds. Hearing took about 1.5 to 3 seconds, writing a short answer a fraction of a second, and speaking from under half a second for a short answer to about 2 seconds for a long one. The small language model was the fastest stage. In a cascade it does not matter much which stage is slow: all of them happen one after another, and you wait for their sum.

Streaming can shave some of it. A real assistant can start speaking the first sentence while the model is still writing the next. For the two-sentence answer to the time question, that saves only a few tenths of a second here, because most of the wait came before any answer existed.

Mistakes travel. In the noise, Whisper heard “Who wrote Pride and Prejudice?” as “He wrote, five and prejudice.” The language model never hears sound, only that text, and it simply repeated it. Clean, the same question got “The novel by Jane Austen.” A cascade is only as good as the text each stage hands on, and no stage knows how sure the one before it was.

Each stage keeps its own weaknesses. Whisper heard “What time is it right now?” as “What time right now?” even without noise; the question was spoken by Supertonic, so the synthetic voice may share the blame. The language model has no clock, and it answered with a two-sentence apology despite being asked for one sentence. Asked for dinner ideas, it started a numbered recipe list in Markdown and was cut off at 48 tokens. The speech stage read “8” as “eight” correctly, and Whisper, listening back, heard “A spider, eight legs.”, dropping “has”.

End-to-end speech models

OpenAI’s description of the Voice Mode that ChatGPT used before May 2024 matches this lab: “a pipeline of three separate models: one simple model transcribes audio to text, GPT-3.5 or GPT-4 takes in text and outputs text, and a third simple model converts that text back to audio”, with average latencies of 2.8 seconds (GPT-3.5) and 5.4 seconds (GPT-4). The text in the middle meant the language model “can’t directly observe tone, multiple speakers, or background noises, and it can’t output laughter, singing, or express emotion” (OpenAI, May 2024).

The alternative is an End-to-end speech modelA model that takes speech in and gives speech out with one network, instead of a cascade of speech recognition, a text model, and text to speech. It can hear and produce tone, laughter, or overlapping talk that text would drop.Open in glossary: one network that takes sound in and produces sound out, usually by turning audio into tokens much as Janus-Pro turns pictures into codes.

  • GPT-4o (OpenAI, 2024) is “trained end-to-end across text, vision, and audio, meaning that all inputs and outputs are processed by the same neural network.” Its system card reports that it “can respond to audio inputs in as little as 232 milliseconds, with an average of 320 milliseconds” (OpenAI, 2024).
  • Moshi (Kyutai, 2024) generates its own speech as audio tokens from a neural codec at 12.5 frames a second, in a stream parallel to the user’s, so it can listen while it talks and has no fixed turns. Its paper reports a theoretical LatencyThe wait between a request and the response, such as the silence between the end of your question and the start of a voice assistant's answer. In a chain of models the waits add up.Open in glossary of 160 ms and 200 ms in practice, against an average of 230 ms between turns in human conversation (Défossez et al., 2024).
  • Qwen2.5-Omni (Alibaba, 2025) splits one model into a “Thinker”, a language model writing text, and a “Talker” that turns the Thinker’s internal states, not just its text, into audio tokens as it goes, trained together end to end (Xu et al., 2025).

A cascade has its own advantages: each part can be swapped, tested, and improved on its own, and the text in the middle can be read, logged, and checked. This lab works only because its three parts are separate models small enough for a laptop. Where multimodal models are heading looks at single models that read and write many kinds of data.

Key ideas

  • A cascaded voice assistant is speech recognition, a language model, and text to speech in a row, passing text between them.
  • Each stage waits for the one before it, so the silence before the answer is the sum of all three; starting to speak before the answer was finished saved only a few tenths of a second here.
  • An early mistake reaches the end: the language model sees only the transcript, with no sound and no sign of doubt.
  • End-to-end speech models such as GPT-4o, Moshi, and Qwen2.5-Omni hear and speak with one network. OpenAI and Kyutai report waits of a few hundred milliseconds, and that the model can take in tone and other sounds that a transcript drops.

Check yourself

Pick an answer to see why it is right or wrong. Nothing is graded. Your first answer is saved in this browser so the question can come back for review.

1In noise, Whisper hears "Who wrote Pride and Prejudice?" as "He wrote, five and prejudice." Why does the language model not correct it?
2OpenAI described its earlier Voice Mode as three models in a row, with average latencies of 2.8 seconds (with GPT-3.5) and 5.4 seconds (with GPT-4). Which change most directly removes the waits adding up?
3What can a cascaded assistant not pass from your voice to the language model, in OpenAI's own description of its earlier Voice Mode?

Progress is saved in this browser only.

Up next in FrontiersDiffusion: from noise to data

Other branches from here

This is the last lesson of Models that hear and speak, and no track builds on it. These branches open from the same point on the route.

  • Advanced6 lessons, 2 hr 45 min

    Inside the model

    Look inside a real language model, watch circuits form, and steer what it says.

    Builds on Transformers and LLMs

    Start with Reading a model layer by layer

  • Advanced9 lessons, 2 hr 28 min

    Models that see

    How models turn pixels into labels, boxes, masks, depth, matches with words, and answers to questions.

    Builds on Transformers and LLMs

    Start with How computers see

  • Advanced12 lessons, 5 hr 5 min

    Frontiers

    Diffusion, multimodal models, mixture of experts, agents, reasoning, and evaluation.

    Builds on Transformers and LLMs

    Start with Diffusion: from noise to data

See every track on the route map or the curriculum atlas.

Next
Models that hear and speak
  1. 1How computers hear
  2. 2What sound is this?
  3. 3Speech to text
  4. 4Text to speech
  5. 5A voice assistant taken apart

Try "embedding", "softmax", "overfitting", or "backpropagation".