amogh.cloud

Menu

P108

Learned

Where Piaa's silences came from

Making Piaa answer quickly wasn't one big fix. It was finding each silent second, from tool searches before it spoke to a starved speech model.

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 ssilence before Piaa's first words on a real voice request to check my email, before the fixes.Method one real voice turn read from the session log: end-of-speech wait, speech-to-text, then two tool-search hops.My session logs, Oct 2026 · Measured by me~3.8 ssilence before Piaa's first words on a real voice request to check my email, before the fixes.Methodone real voice turn read from the session log: end-of-speech wait, speech-to-text, then two tool-search hops.SourceMy session logs, Oct 2026ClassMeasured by me · Oct 2026 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%share of searched-for tool calls that went to the few most-used tool groups.Method count over all session logs of calls to tools that are found through search.My session logs, Oct 2026 · Derived62%share of searched-for tool calls that went to the few most-used tool groups.Methodcount over all session logs of calls to tools that are found through search.SourceMy session logs, Oct 2026ClassDerived · Oct 2026 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 per test pass once the most-used tools were listed from the start.Method my 20-question tool test, same model, 5 passes each way: 33.6 vs 27.4 steps per pass; accuracy 14.6 vs 16.2 out of 20, within noise.My measurements, same session, Oct 2026 · Derived18%fewer model steps per test pass once the most-used tools were listed from the start.Methodmy 20-question tool test, same model, 5 passes each way: 33.6 vs 27.4 steps per pass; accuracy 14.6 vs 16.2 out of 20, within noise.SourceMy measurements, same session, Oct 2026ClassDerived · Oct 2026 fewer model steps, with accuracy within the test’s noise.

My first version used a fixed list, and it cost ~9,700 tokensprompt space the fixed list of most-used tools took, which squeezed the room left for a turn's own tool results; room for tool results fell from about 12,800 to about 5,500 tokens.Method token count of the tool schemas for five resident tool groups.My measurements, Oct 2026 · Measured by me~9,700 tokensprompt space the fixed list of most-used tools took, which squeezed the room left for a turn's own tool results; room for tool results fell from about 12,800 to about 5,500 tokens.Methodtoken count of the tool schemas for five resident tool groups.SourceMy measurements, Oct 2026ClassMeasured by me · Oct 2026 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 tokensprompt budget for tools that are listed from the start, filled by how often I actually use each group.Method at boot, whole tool groups are added by recent use per token (14-day half-life) until the budget is full; an incumbent stays unless a newcomer beats it by 25% per token.My code, Oct 2026 · Specification4,000 tokensprompt budget for tools that are listed from the start, filled by how often I actually use each group.Methodat boot, whole tool groups are added by recent use per token (14-day half-life) until the budget is full; an incumbent stays unless a newcomer beats it by 25% per token.SourceMy code, Oct 2026ClassSpecification · Oct 2026 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 stime the first voice turn after a restart took, before the warm-up; later turns started speaking about 1.7 s after I stopped talking.Method one first turn read from the log: 6.9 s cold speech-to-text, about 1.3 s for the first memory lookup, 6.2 s reading an 8,070-token prompt.My session logs, Oct 2026 · Measured by me14.5 stime the first voice turn after a restart took, before the warm-up; later turns started speaking about 1.7 s after I stopped talking.Methodone first turn read from the log: 6.9 s cold speech-to-text, about 1.3 s for the first memory lookup, 6.2 s reading an 8,070-token prompt.SourceMy session logs, Oct 2026ClassMeasured by me · Oct 2026. 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 stime the background warm-up takes at start-up, all before the first turn.Method from a boot log: first memory lookup, a half-second silent transcription, and a one-token reply per mode with the real prompt.My boot log, Nov 2026 · Measured by me15.1 stime the background warm-up takes at start-up, all before the first turn.Methodfrom a boot log: first memory lookup, a half-second silent transcription, and a one-token reply per mode with the real prompt.SourceMy boot log, Nov 2026ClassMeasured by me · Nov 2026, 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 sspeech-to-text time for a 5-second clip once it could use four free cores; 0.70 s while pinned to one physical core; a real 5-second request had taken 2.21 s.Method isolated, best of 3, CPU only, mic-shaped 16 kHz clip with the speech filter on; 2 threads pinned to one physical core vs 4 unpinned threads.My measurements, Oct 2026 · Measured by me0.50 sspeech-to-text time for a 5-second clip once it could use four free cores; 0.70 s while pinned to one physical core; a real 5-second request had taken 2.21 s.Methodisolated, best of 3, CPU only, mic-shaped 16 kHz clip with the speech filter on; 2 threads pinned to one physical core vs 4 unpinned threads.SourceMy measurements, Oct 2026ClassMeasured by me · Oct 2026. 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 stime to transcribe a 25-second clip while a CPU-heavy model was generating next to it; 3.5 s with that model loaded but idle.Method speech-to-text on a 25 s clip with the other model idle, loaded, and generating.Note A second run with a shorter generation took 8.76 s.My measurements, Oct 2026 · Measured by me22.9 stime to transcribe a 25-second clip while a CPU-heavy model was generating next to it; 3.5 s with that model loaded but idle.Methodspeech-to-text on a 25 s clip with the other model idle, loaded, and generating.NoteA second run with a shorter generation took 8.76 s.SourceMy measurements, Oct 2026ClassMeasured by me · Oct 2026, 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.