In a voice assistant, the number that matters most is how long you wait after you stop talking. Piaa, my voice assistant, runs everything on one PC: the main AI model on the graphics card, and the speech-to-text and the voice on the main processor. Once the model starts writing, it's fast. The silences came from everywhere else.
So I stopped looking at average speed and started taking single silences apart.
Where one silence went
I asked Piaa to check my email, and it said nothing for ~3.8 s before its first words. The log showed where that time went. A short part was the wait to be sure I had finished speaking, and another short part was turning my speech into text. Most of it went on two rounds of the model before it said anything: one to search for the mail tool, and one to call it.
Speak as soon as you know
Piaa finds most of its tools by searching for them, so the tool list it reads stays small. Now, when the model searches for a tool, Piaa says a short acknowledgement for the best match straight away, a whole round earlier than before. It says it once per turn.
It only does this when the search is clearly confident. Real requests scored well above the bar I set and junk well below it, and a wrong line spoken as fact is worse than a moment of silence.
Keep the common tools ready
The few tool groups I use most accounted for 62% of the tools Piaa had to search for. Listing those from the start lets their calls skip the search round entirely. On my tool-choice test that meant 18% fewer model steps, with accuracy within the test's noise.
My first version used a fixed list, and it cost ~9,700 tokens of prompt space. That squeezed the room left for a turn's own tool results, so a long session that read a big web page could run out of room and fail.
So the list is now chosen by use. Every tool call is counted, and older use counts for less: its weight halves every two weeks. When Piaa starts, it fills a budget of 4,000 tokens with the tool groups that give the most use for their size. A group already in the list keeps its place unless a newcomer beats it by a clear margin, so near-ties can't flip between restarts. The choice is made once at start-up and then stays fixed, so the prompt cache keeps working. I haven't measured the accuracy of this budgeted version separately yet, and my test doesn't cover some tool groups at all.
Warm up before the first turn
Once I'd fixed the prompt cache, later turns started speaking less than two seconds after the pause that tells Piaa I've finished. The first turn after a restart was still slow, at 14.5 s. The speech model was cold, the first memory lookup was slow, and the whole system prompt had to be read from scratch.
Now a warm-up runs in the background at start-up. It does a first memory lookup, transcribes half a second of silence, and asks each mode for a reply just one word long using exactly the system prompt a real turn would build. The voice mode goes last, so its prompt is the one left in the cache. Real turns and the warm-up use the same code to build the prompt, so they can't drift apart. The warm-up takes 15.1 s, and it's done before I say anything.
Give speech-to-text real CPU cores
Speech-to-text had been limited to two threads on what turned out to be a single physical core. It was a leftover from an old misdiagnosis that I had kept as harmless tidiness. Given four free threads instead, a five-second clip took 0.50 s. In real sessions it had been much worse than the test, because anything else that landed on that one core had nowhere else to go.
A model that starves the speech model
I also tried a larger model that does part of its work on the main processor. While it sat loaded and idle, it cost nothing. While it was writing, transcribing a 25-second clip took 22.9 s, because it took the cores the speech model needed.
A normal turn is listen, then think, so the two never overlap. The case that bites is when I interrupt Piaa mid-answer: the speech model then has to work while the big model is still writing. So that model is only for text and coding, never for voice.
What I took from it
- Take one slow turn apart second by second before trying to make everything faster.
- Speak early, but only when you're sure. A wrong word is worse than a short silence.
- Idle load is free, and load at the same time is not. Test the moments when two things run together, like an interruption.
- Warm everything before the first real turn, using the same code the real turn uses.
Seen it differently, or hit the same wall? Email me.
Written by me.