Design a voice assistant like alexa
PremiumML systemMedium
- Wake word detection
- Speech recognition
- WER
Quick answer
This ML system interview question asks you to design a voice assistant like alexa. Aim for a design that turns data into useful predictions in production, then explain the data, training, serving and monitoring. Interviewers want to see how you frame the problem, measure success and keep the model healthy after launch.
The problem
Design a voice assistant like Alexa: a smart speaker that wakes on its name, understands a spoken request such as "play jazz in the kitchen" and acts on it. The hard parts are a wake word that rarely fires by mistake while listening all day, accurate speech recognition across accents and noise, and doing it all within about a second.
The pipeline has four model stages: wake word detection on the device, streaming speech recognition (ASR) in the cloud, language understanding (intent and slots), and a response read out by text to speech. Audio leaves the device only after the wake word fires.
What must a voice assistant like alexa do?
- Wake word: Detect the wake word on the device and start streaming audio to the cloud.
- Speech to text: Transcribe the request while the user is still speaking.
How well must it do it?
- Few false wakes: At most 1 false wake per device per week, while missing no more than 5% of real wake words.
- Fast: Under 1.2 s p95 from the end of speech to the start of the spoken reply.
What scale should you design for?
Use these numbers in your estimates.
The scale numbers unlock with this questionUnlock
Key concepts
- Wake word detection
- Speech recognition
- WER
- Intent classification
- Slot filling
- On device ML
How you’ll practise
- Problem framing
- Data and labels
- Features and model
- Training and evaluation
- Serving and monitoring
- Wrap-up
Lala, personalized to you, gives a hint when you ask and reviews your design when you are ready.
What do interviewers look for?
In any ML system design round.
- Frames the product goal as a clear ML problem
- Defines offline and online success metrics
- Explains where the data and labels come from
- Separates training from serving and keeps features consistent
- Plans for drift, retraining and rollbacks
- Weighs model quality against latency and cost
Questions people ask about this interview question
- Which design type is this question?
- It is an ML system question. You design a voice assistant like alexa and explain your choices the way you would in an interview.
- Is this question asked at entry level?
- It is marked Medium. Entry-level engineers can practise it, but it expects you to reason about requirements and trade-offs, not only list components.
- What should I cover first?
- Start with the product goal, how success is measured and what data is available. Agree on scope with the interviewer before you design anything.
- Can I practise it for free?
- It is a premium question. Sign up and unlock it once for 10 credits; it then stays unlocked. When you finish, Lala, your personalized AI mentor, can review your design for 30 credits.
Related questions
Updated · Written by the SevyDevy team