Skip to main content
Back to Proof of Impact
04 / Case Study _09In Use

Text at the Cursor
in 633 ms

Open Models on One Mac · Loopback Only · Every Choice Measured

Dictation should feel like typing, and the audio should never leave the machine.

Three small open models run on one Mac. Transcription runs while I speak, and every choice was settled by a measurement.

Milliseconds from key release to text at the cursor
633
Terms fixed by a lookup, where a prompt fixed 0 / 6
7 / 7
Cleanup model kept after a 4B read worse
1.7B
GB of memory with all three loaded, none when they're down
~4

As of October 2026 · project record

Walkthrough

How a Dictation Lands

Scroll to step through
Key Release → Cursor
How a dictation lands: hold the key, stream speech-to-text, release, correct by lookup, clean in chunks with a small model, paste at the cursor
00/ 06
How a Dictation Lands
633 ms
key release → text at the cursor

Text at the Cursor
in
633 ms

Most of the work happens while I'm still speaking, so letting go of the key pays only for what's left.

  • HoldRight Option down, speak, let go
  • Localthree open models on one Mac, loopback only
  • Measuredevery choice below was settled by a number
ParakeetQwen3-1.7Bllama.cppHammerspoon
Learning

Learning From My Edits

Every paste is compared with what I actually sent. Where I fixed a word, the system learns a correction; where I moved a sentence break, it learns how long my pauses are. My edits are the labels.

MY EDITS ARE THE LABELS · THE MODEL NEVER CHANGES2 SIGHTINGS · 20 PAUSESOFF THE HOT PATHLEARNERafter every paste1PASTE LOGwhat was pasted2WHAT I SENTafter my edits4VOCABULARY:8770 · the lookup4PAUSE THRESHOLD0.4–1.5 s12344
  1. Every Paste Is Logged

    What was pasted and where, written after the text is delivered, never on the hot path.

  2. Compared With What I Sent

    Each paste is matched to the message I actually sent and aligned word by word.

  3. Each Change Is Classified

    A moved sentence break, a misheard word or a rewrite. Rewrites are my style, so they are never learned.

  4. Promoted Behind Gates

    A misheard word joins the lookup after two sightings and 80% agreement. The pause threshold moves only with 20 labelled breaks, within 0.4–1.5 s and at most 0.2 s a pass. The model never changes.

Where It Stands

It has run on 18 of my real dictations and promoted nothing yet: it has seen one mishearing once, and 11 of the 20 labelled pauses it waits for.

Setup

The Three Services, Side by Side

Each model runs as its own local service with an API shaped like OpenAI's, so anything that speaks that API can use it. None of them answers beyond this machine.

Speech-to-Text

Model
parakeet-tdt-0.6b-v3 on MLX
Server
A FastAPI server I wrote, because parakeet-mlx ships none
Port & API
:8770 · transcriptions, a streaming WebSocket, health
Starts
Off by default; dictation starts it at login. launchd restarts it if it dies; the model loads on first use.
Memory
~1.6–1.9 GB
Who Calls It
Dictation, and my voice assistant's talk mode, which gets the same vocabulary

Cleanup

Model
Qwen3-1.7B, Q4_K_M
Server
Stock llama-server, one slot
Port & API
:8771 · chat completions
Starts
Off by default; dictation starts it at login. launchd restarts it if it dies; its own health budget at start.
Memory
~1.5–1.7 GB
Who Calls It
Dictation's cleanup pass

Speech

Model
Kokoro-82M on MLX
Server
Stock mlx-audio server
Port & API
:8772 · speech
Starts
Off until something asks for speech. Loads its model on the first request.
Memory
~0.8–0.9 GB
Who Calls It
The closed-loop self-test, and anything that speaks the OpenAI speech API

One Service, as launchd Sees It

The cleanup model's template, trimmed. Loopback only, off until something asks for it, restarted if it dies.

launchd/local-ai.llm.plist.tpl
<key>Label</key><string>local-ai.llm</string><key>ProgramArguments</key><array>    <string>__LLAMA_SERVER__</string>    <string>-m</string>    <string>__MODEL_GGUF__</string>    <string>--port</string>    <string>8771</string>    <string>--host</string>    <string>127.0.0.1</string>    …</array>…<key>RunAtLoad</key><false/><key>KeepAlive</key><true/>

Every Change Is Scored on Two Tiers

Eighteen synthetic cases catch regressions; six of my own dictations catch what synthetic text never shows, and five more were captured from use. The synthetic tier once passed 18 of 18 while the real one passed 0 of 6, which is why the real tier exists. A closed-loop self-test speaks a sentence, transcribes it and cleans it.

The Hard Parts

What the Model Couldn't Do

Each of these failed quietly: the output looked fine until I measured it. Each fix moved work out of the model and into code, or into a smaller model.

01

The Echo Cliff

The Rule
The cleanup model repairs punctuation and sentence breaks in what I dictated.
How It Breaks
Past about 120 words Qwen3-1.7B returns its input word for word. Ten prompt and sampling setups all echoed. Nothing errors; the text just isn't cleaned.
What Stops It
Text goes in at most 90 words at a time, under the cliff at about 100. An echo guard spots a reply that only repeats its input and keeps the raw chunk.
02

Lookup, Not Prompt

The Rule
Names and terms the speech model mishears must come out right.
How It Breaks
Listing them in the prompt fixed 0 of 6. The cleanup model even rewrote a term the lookup had already fixed.
What Stops It
A literal replacement table runs on every partial, on the final, and again after the model: 7 of 7.
03

A Bigger Model Read Worse

The Rule
Cleanup has to finish inside a 1.5 s budget at 60 words.
How It Breaks
Qwen3-4B, tested side by side on a scratch port: sentence-break precision 0.52 against 0.65, 1136 ms against 537 ms at 60 words, a gigabyte more memory, about 1.6 s end to end.
What Stops It
The 1.7B model stayed. The live service was never touched during the test.
04

The Retraction That Leaked

The Rule
When I correct myself mid-sentence, the words I took back must not reach the page.
How It Breaks
A length guard read the shorter, corrected reply as broken and pasted the raw text, retracted words included.
What Stops It
Retractions get a lower floor, 10% of the input instead of 40%, so a correct, shorter answer is kept.

What Broke and Was Fixed

What Broke
On every release, ffmpeg ignored the polite stop signal and the code waited for it: 75% of the time between letting go and seeing text.
The Fix
It is killed outright, and the dead process is cleaned up after the text is delivered.
Results

What Runs Today

633 ms

From key release to text at the cursor on a normal take: 357 ms final decode, 275 ms cleanup, ~86 ms paste

~0.85 s

Long takes: ~0.85 s at 90 words and ~4.1 s at 450, because llama-server cleans one chunk at a time

~0.2 s

Streaming: partials ~0.2 s behind the voice and the final ~0.5 s after the last frame, on 24 s of dictation

1.00

Sentence breaks from the speaker's pauses: recall 0.49 → 1.00 and wrong cuts 12 → 1 with correct pauses supplied; the 0.6 s pause threshold is a starting value my edits will tune

537 ms

1.7B against 4B: cleanup 537 vs 1136 ms at 60 words and 4.1 vs 11.7 s at 450; 2.1 vs 3.1 GB; sentence-break precision 0.65 vs 0.52. The smaller model stayed.

4 / 6

Eval: the real tier went from 0 / 6 to 4 / 6 with the shipped pipeline; known terms from 0 / 13 to 13 / 13

For Your Team

Run Models on Your Own Hardware

Audio that can't leave the building, or a model bill you'd rather not have: the same parts run on a Mac on a desk or a box in a server room.

What I Set Up

  1. Local ServicesEach model behind an API shaped like OpenAI's, on loopback, off until needed.
  2. A Two-Tier EvalSynthetic cases for regressions and a real tier from your own recordings, because the synthetic tier alone passed everything.
  3. Lookup Before PromptYour names and terms in a table that runs before and after the model.
  4. Fail OpenEvery model step keeps the raw text when its output looks wrong, so a bad pass costs a repair, never the words.

What I Tune

  1. Model SizeChosen by your eval and your latency budget, not by parameter count.
  2. Chunk SizeSet under the point where your model stops repairing.
  3. The VocabularyYour product names, people and jargon, learned from your own edits.
Contact

Need something like this built?

Currently accepting 1-2 new engagements

Let's talk on LinkedIn
ReferenceTechnical StackShow
Layer
Technology
Speech-to-Text
parakeet-tdt-0.6b-v3 (MLX) via parakeet-mlx, custom FastAPI/uvicorn server
Cleanup LLM
Qwen3-1.7B, Q4_K_M GGUF, on llama.cpp llama-server
Text-to-Speech
Kokoro-82M (MLX) on mlx-audio server
APIs
OpenAI-shaped HTTP endpoints plus a streaming WebSocket, loopback only
Supervision
launchd, bash, just
Dictation Client
Hammerspoon (Lua), Python, ffmpeg (avfoundation)
Language
Python (asyncio, NumPy, difflib), unittest for the learning loop, uv
Hardware
Apple Silicon (M4 Pro), one Mac