SLMs · 5 min read
Voice agents on small language models
You can now run a full voice assistant — listening, thinking and speaking — on a phone or laptop. Here is how the pipeline fits together, what small models can and can't do, and the lessons builders keep learning the hard way.
A few years ago, a voice assistant meant sending audio to a data centre. Today, small language models (SLMs) and compact speech models are good enough to run the whole loop — hearing, understanding, responding and speaking — on a phone or laptop.
That opens up voice products that work offline, keep audio private and respond without a network round trip. It also brings a new set of engineering problems. This post walks through the architecture and the lessons from teams who have shipped it.
The pipeline: four models and a conductor
Most on-device voice agents today use a cascaded pipeline:
- VAD (voice activity detection): a tiny model that decides when someone is speaking.
- STT (speech-to-text): turns speech into text, ideally while the person is still talking.
- SLM: decides what to say or which tool to call.
- TTS (text-to-speech): turns the reply back into audio.
Around them sits an orchestrator — a state machine that handles turn-taking, interruptions, conversation history and tool calls. It is easy to underestimate. The models get the attention, but the orchestrator decides whether the conversation feels natural.
The alternative is a single speech-to-speech model that takes audio in and produces audio out. These can feel more natural, but cascaded pipelines remain popular on devices because each stage can be swapped, measured and debugged on its own.
What fits on a device
One open-source team published measurements of a full pipeline running locally:
| Device | Stage | Model | Speed | Memory |
|---|---|---|---|---|
| iPhone 16 Pro | STT | Parakeet-EOU 120M | 0.04 RTF | 297 MB |
| iPhone 16 Pro | TTS | Kokoro-82M | 0.08 RTF | 676 MB |
| iPhone 16 Pro | SLM | FunctionGemma 270M | 128 tokens/s | 236 MB |
| Mac (M5 Pro) | SLM | Gemma 4 E2B (4-bit) | 214 tokens/s | 2.9 GB |
RTF (real-time factor) is processing time divided by audio length; below 1.0 means faster than real time.
They reported the whole loop fitting in about 1.2 GB on an iPhone and about 3.6 GB on a desktop. Two choices stand out:
- On phones, a 270M-parameter model was enough to call tools, but they rejected sub-1B models for open conversation because they “wobble” over multiple turns. Bigger models went to the desktop.
- They skipped voice-cloning TTS because it wasn’t reliable enough for an always-on agent, and chose stable, fast voices instead.
The broader lesson: match the model to the job. A tiny model can route requests and fill in tool parameters. Natural multi-turn conversation needs more capacity, or help from the cloud.
Latency is the product
In voice, delay is felt immediately. A text chatbot that takes two seconds is fine; a voice assistant that pauses for two seconds feels broken.
Another team building an on-device agent with Whisper, Llama 3.2 1B and a local TTS on an iPhone 13 shared useful numbers and fixes:
- Their median on-device reply took about 2.6 seconds.
- One slow reply took 9.3 seconds. Cutting the maximum output from 200 to 80 tokens brought it to about 3.5 seconds — with no change to what users heard, because only the first sentence was ever spoken.
- They waited 850 ms of silence to decide the user had finished, and the same delay controlled how fast a user could interrupt.
Practical ways to cut perceived latency:
- Stream everything. Start transcribing while the user speaks, start the SLM as soon as the turn ends, and start speaking the first sentence while the rest is still being generated.
- Keep replies short. Spoken answers should be one or two sentences. Limit output length accordingly.
- Use a turn-end model, not just a silence timer, so the agent knows when you’ve finished without long pauses.
- Support barge-in. Users interrupt. The agent should stop talking immediately and listen.
Lessons that keep coming up
Small models don’t follow rules like big ones. The iPhone team found their 1B model repeating a fixed refusal and applying a rule too broadly. The fix was to move the decision into code that checks the model’s output, rather than relying on instructions in the prompt.
Tell the model what to do, not what the situation is. Instructions phrased as actions (“say you can’t check that, and suggest who can”) worked better than descriptions of the context.
More history isn’t better. Replaying 40 previous messages made answers drift towards older topics. About ten worked better. This is context engineering on a small budget.
Speech recognition errors propagate. A base English STT model regularly misheard place names, and nothing downstream caught it. Confirming key details back to the user, or retrieval to check names, helps.
Small models invent facts confidently. Give them retrieval over trusted data instead of relying on what they “know”.
App size is real. One build reached 1.63 GB before the team moved the model to a first-launch download and removed unused speech files, bringing the app to 384 MB.
Test on real devices early. Both teams found that the most important bugs only appeared on physical phones.
A hybrid pattern that works
A sensible architecture for many products:
- Always on the device: VAD, speech recognition, text-to-speech and simple intents. Audio never leaves the phone.
- Small model on the device for quick commands, tool calls and offline use.
- Optional cloud model for complex questions, with the user’s consent and a clear indicator — sharing the same conversation transcript, but with its own prompt.
This keeps the experience fast and private by default, while still allowing harder questions to get a better answer.
Where to start
- Build the cascaded pipeline with off-the-shelf components and measure each stage separately.
- Set a latency budget per stage and measure on the oldest device you plan to support.
- Keep spoken replies short, and stream the first sentence.
- Move important rules from the prompt into code checks.
- Add retrieval before trusting the model with facts.
In a follow-up we’ll look more closely at turn-taking and interruptions — the part that decides whether a voice agent feels like a conversation or a walkie-talkie.