My Voice Assistant Gave Perfect Answers Six Seconds Late

Last week I watched someone try the voice assistant I’ve been building in Python. They asked it a question and waited. They glanced at me, then waited a bit longer. Then they simply stopped, put the laptop down, and moved on to something else. About two seconds after they’d given up, the assistant produced its answer, and the answer was correct. I’ve been thinking about that gap ever since, because it taught me something no text project could have: in a real-time system, slow isn’t a performance problem. Slow is the same as wrong. Nobody keeps talking to a wall that pauses.

Five stages, five ways to fail

A voice assistant is a relay race. Speech becomes text, the system decides you’ve finished talking, it works out what you meant, it decides what to say, and then text becomes speech again. I built every leg myself, and every leg turned out to have its own way of losing the race.

Speech recognition was where I met word error rate, and where I learned that it’s far more dangerous inside a pipeline than it looks on a benchmark. A ten percent error rate doesn’t cost you ten percent of your quality. If the system hears “council my booking” instead of “cancel my booking,” one wrong word has flipped the entire intent, and every stage downstream builds confidently on the mistake. The next stage, voice activity detection, decides when you’ve stopped speaking, and it’s the least glamorous component with the biggest influence on whether the thing feels human. Wait too long and there’s dead air; cut in too early and it interrupts you mid-sentence. Worse, the right threshold for someone firing off a quick command is wrong for someone thinking out loud. I hadn’t realised conversation has timing as well as content.

My chatbot pipeline plugged into the understanding stage almost unchanged, except that the input was now transcribed speech: no capitals, no punctuation, numbers spelled out as words, homophones everywhere. Everything I’d built assumed tidy written text. Dialogue got harder too, because a person listening can’t scroll back up to re-read a long answer, and they interrupt. Supporting that, so the assistant stops speaking the instant you cut in and starts listening again, was the moment I understood this wasn’t a request-and-response program at all. It was a concurrent one, and I’d been writing it as though everyone took polite turns. Even the final stage forced a rewrite. A reply designed for a screen, with three bulleted options and a cheerful sign-off, is unbearable when read aloud. Spoken answers have to be short and lead with the point: “I’ve got ten, two, or four. Which works?” The medium was quietly dictating what the intelligence was allowed to say.

The budget that changed how I work

When I added up my six seconds, the frustrating discovery was that no individual stage looked slow. So I did something that has changed how I approach every system since: I wrote down a latency budget, a target time for each stage, and instrumented the pipeline to measure where the time actually went. It was nowhere near where I’d guessed. I had been carefully optimising the understanding stage, which was already the fastest part. The real culprits were the speech recognition and the endpointing.

StageBeforeAfter
Speech-to-text~2.1s~0.7s
Deciding you’ve finished~1.2s~0.4s
Understanding + response~1.3s~0.8s
First audio out~1.4s~0.3s
What the user feels~6sunder 2s

The fixes were less about speed than about overlap. I stopped waiting for each stage to finish before starting the next: transcription runs while you’re still talking, and the assistant starts speaking its first sentence while the rest is still being prepared. I loaded every model once at startup and cached whatever I could. I swapped the largest speech model for a smaller one, because it wasn’t worth its extra second on short commands, which was the first time I’d consciously traded accuracy against speed instead of just picking whatever scored highest. The silliest-sounding change worked surprisingly well: a short acknowledgement sound the instant someone stops talking made the same delay feel dramatically shorter. That annoys me as an engineer and convinces me completely as a user.

The thing the papers weren’t measuring

The arithmetic of chained failures is the lesson I’ll keep. If each of five stages works ninety-five percent of the time, the whole pipeline works about seventy-seven percent of the time, and the failures are rarely where they appear to be. I knew the multiplication before this project. I hadn’t felt it until a transcription slip produced a confidently wrong action four stages later.

I’ve now read thirty-odd papers for this project, on speech recognition, dialogue state tracking, endpointing and embeddings, and I noticed something that bothers me. The literature measures these components one at a time. Papers report word error rate, or intent accuracy, or latency, in isolation. I found very little that compares how design choices trade off against each other across the whole pipeline, which is the only question I actually had while building. When I mentioned this to a professor, he said that’s often where a paper comes from: not from a breakthrough, but from noticing a gap in how a field describes itself.

So I’m going to try to write it up. The problem is that I have no idea what writing it up properly means. My instinct is to describe what I built, the architecture and the demo, and I have a suspicion that instinct is wrong, though I can’t yet say why.

Leave a Reply