It's not one AI. It's five, working in a relay.
When you say "Hey Siri" or "Alexa" and ask a question, the answer comes back so fast it feels like magic, like you're talking to one single, smart brain. You're actually not. You're talking to a pipeline: a chain of separate, specialized AI systems that each do one specific job and then hand off to the next one, all in well under a second.
Here are the five stages, in order. We'll walk through each one, and then you'll get to run your own questions through the whole pipeline yourself.
Key idea: no single AI system understands your question and speaks the answer. Each stage does one narrow job well, then passes its result to the next stage in line.
Wake word detection
A device like a smart speaker isn't sending everything you say to the internet. That would use a huge amount of data and battery, and it would raise some real privacy concerns. Instead, it's always listening for exactly one short sound pattern: a wake word, like "Hey Siri," "Alexa," or "OK Google."
That wake word is detected by a small, efficient AI model that runs entirely on the device itself, not in the cloud. It's built to do one narrow job extremely well: notice that one specific sound pattern and ignore everything else. It's too small and specialized to understand what you're saying, and it doesn't try to.
Only once that exact wake word is heard does the device "wake up," start actively recording, and begin sending your audio onward to the next stage of the pipeline.
Worth knowing: your device isn't understanding or storing everything you say around it. The on-device wake word model is only ever checking "was that one specific sound?" Everything else is not transcribed, not understood, and not sent anywhere — until that one wake word is heard.
Speech-to-text
Once the wake word is detected, your spoken question is recorded and converted into written text. This step is called speech-to-text (sometimes called speech recognition).
It's handled by a speech recognition model trained on a massive number of recorded audio clips, each one paired with its correct written transcript. Over time, that training teaches the model to map patterns of sound to the words that produced them — even across countless different voices, speeds, and accents.
This step is also where things can go wrong. Background noise, strong accents, or mumbled words can all make the sound patterns harder to match, which is exactly why a voice assistant sometimes mishears you and answers a totally different question than the one you asked.
Understanding (natural language understanding)
Having the plain text of what you said isn't actually enough to do anything with it. The system still needs to figure out two things: your intent (what you actually want it to do) and any key details, called entities, that it needs in order to do it. This step is called natural language understanding, or NLU.
For example, take the question "What's the weather in Chicago tomorrow?" NLU turns that sentence into something structured a computer can act on:
intent: get_weather
entities: { location: "Chicago", day: "tomorrow" }
Modern voice assistants increasingly lean on large language models to do this step, since LLMs are good at handling all the different ways people might phrase the same request. If you want to see how an LLM turns text into a response in general, check out How Does an LLM Answer Questions? — we won't re-cover that here.
Taking action
Once the system knows your intent and the key details, it has to actually go do something with them. It calls whatever tool or service can fulfill that specific intent: a weather API for a forecast, a timer function to count down minutes, a smart-home command to turn off a light, or a web search for something more open-ended.
This is the exact same idea behind a tool-using AI agent: an AI that doesn't just talk, but reaches out and calls a real tool to get something done in the world. If you want the deeper dive on how that works, see What Are AI Agents? — we're only using the idea here, not re-explaining it.
Text-to-speech
The tool has done its job and produced an answer, but that answer starts out as plain text, like "It's 72 and sunny today." The last stage, called text-to-speech (TTS), converts that written answer back into audio you can actually hear.
Like speech-to-text, this is a trained model — but running in the opposite direction. It's trained on huge amounts of real recorded human speech, which is exactly why modern voice assistants can sound so natural and human, with realistic pacing, pitch, and emphasis, instead of the choppy, robotic voices you might remember from older devices.
Try the pipeline yourself
Pick something to "ask," then step through all five stages and watch exactly what data looks like at each point along the way. Use Next step to go at your own pace, or Play through to watch the whole pipeline run automatically.
Choose a question to ask
Pick a question above to send it through the pipeline.
When it goes wrong
Voice assistants sometimes seem to "misunderstand" you, and it's usually not mysterious at all. It's a natural side effect of being a multi-stage pipeline: a mistake at any single stage breaks the whole chain, since each stage only gets to work with whatever the previous stage handed it.
Noisy speech-to-text
Background noise, a strong accent, or mumbled words can throw off Stage 2, so the text it produces is already wrong before Stage 3 even sees it.
Ambiguous phrasing
"Play Cats" could mean the movie, the musical, or a song called "Cats." If Stage 3 can't tell which intent you meant, it has to guess — and sometimes guesses wrong.
No matching tool
Even with a perfectly understood intent, Stage 4 can only act if it has the right tool for the job. Ask for something it has no skill for, and it simply can't follow through.
Check your understanding
Trace it through the pipeline yourself: what happens, stage by stage, if you say "Hey Google, remind me to walk the dog at 6pm"?
Sample answer: Stage 1, the on-device model detects "Hey Google" and starts recording. Stage 2, speech-to-text converts the audio into the text "remind me to walk the dog at 6pm." Stage 3, NLU reads that text and figures out intent: set_reminder with entities like task: "walk the dog" and time: "6pm". Stage 4, it calls a reminders/calendar tool and actually creates the reminder. Stage 5, text-to-speech turns the confirmation into spoken audio: "Okay, I'll remind you to walk the dog at 6pm."
Quick quiz
1. Why doesn't a smart speaker send everything you say to the internet?
2. What does the "understanding" stage (natural language understanding) actually figure out?
3. Why can a voice assistant "misunderstand" you even when nothing is technically broken?
You've made it through the series
That wraps up this Responsible AI & Safety series: from prompt injection and deepfakes to alignment, AI-detecting-AI, and now the pipeline behind the voice assistants you talk to every day. Take what you've learned further with a full CodeHS pathway.
Part of the "Responsible AI & Safety" tutorial series.