Rules handle
- Filler words like "um".
- Stutters like "wh wh wh what".
- Company names and jargon the recogniser wrote as ordinary words.
- Spoken emoji, such as "fire emoji".
- Your own replacement rules, applied last.
The model handles
- Self-corrections, like "no, Friday" cancelling "Thursday".
- Telling a stutter from emphasis: "the the deadline" against "Alright, alright, alright".
- Words with two meanings, like "period".
- Whether "new line" is a command or something you said.
Dictation cleanup works best as two stages. Fixed rules handle what a pattern can fix, then a small fine-tuned model handles what needs a judgement about what you meant.
One model doing both jobs is slower, costs more, and is measurably worse at the part that matters most: leaving correct text alone. Both halves are published, the rules layer under MIT and SpeakoFlow Mini under Apache-2.0.
What does the speech recogniser already fix?
More than most cleanup code assumes. Punctuation, capitalisation, some filler removal and number formatting now happen in the recogniser itself.
Say "the deposit is three hundred dollars, um, and the meeting is at nine thirty" into SpeakoFlow with AI cleanup off, which is the default. You get "The deposit is $300 and the meeting is at 9:30". No language model was involved.
Before writing any cleanup, run a dozen real dictations through your recogniser with cleanup off and read the raw output. What is left over is the real job, and almost all of it is judgement rather than formatting.
Which fixes belong in rules rather than a model?
Anything where the right output follows from the input alone. Removing "um" is a table lookup. Collapsing "wh wh wh what" is a loop. Spelling a company name the recogniser has never heard is a dictionary.
Sending those to a language model adds delay, cost and variation: a model told to drop a filler word will sometimes rewrite the sentence around it. A rules stage gives the same output every run, offline, in about a millisecond.
Filler lists have to be written per language. "Um" is an English filler and the Portuguese word for "a", and "ha" is Spanish for "has". One global list quietly deletes real words in every language it was not written for.
Rules written from memory also break, and the repository publishes the sentence that killed each discarded one.
| The obvious rule | The sentence that kills it |
|---|---|
| Replace the spoken word "comma" with a comma | "the supplementary file is comma separated" |
| Replace the spoken word "period" with a full stop | "for a period" |
| Collapse any doubled word | "Alright, alright, alright" |
Every surviving rule is checked on its own against a set of transcripts that are already correct, and the check fails if it changes any of them. A rules stage is allowed to decline. It is not allowed to damage.
On the benchmark, eight ordered regular expressions fixed roughly a fifth of the transcripts that needed an edit, with perfect restraint and zero content loss. Sending that share to a model pays for work a substitution already does.
Which fixes need a model?
The ones that need a decision a pattern cannot express. Three examples:
- Stutter or emphasis. "the the deadline" is a stumble to collapse. "Alright, alright, alright" is not. To a rule the two look the same.
- Words with two meanings. "Period" is punctuation, a fiscal period or a historical era, depending on the sentence around it.
- An instruction, or something you said. A mid-clause "new line" is a layout command in one sentence and part of the content in another. With no punctuation from the recogniser, nothing mechanical tells them apart.
Then there are the cases where the recogniser was right and you were not: a mid-sentence self-correction, a restated name, or "in the mourning", spelled correctly and still not what you meant.
Let the model stage fail safely. If it times out, errors or comes back empty, throw its output away and keep the text from the previous stage. Otherwise a cleanup feature can turn a working dictation into nothing.
What order should the cleanup stages run in?
Rules that remove problems go before the model, and rules that state what you want go after it. Reordering them changes the output.
- 1. Vocabulary correction
- Before the model. Fix jargon and names the recogniser wrote as ordinary words, so the model never has to guess. If your recogniser accepts a hot-word or bias prompt, use that instead: steering the decoder beats repairing its output.
- 2. Filler and stutter removal
- Before the model. Deletion only. It must not add, reorder or re-case any word it is not deleting.
- 3. The model
- The middle. The only stage allowed to be wrong in an interesting way.
- 4. Spoken emoji expansion
- After the model. Off by default. The trailing keyword ("fire emoji") is required, which stops the word "fire" turning into an emoji.
- 5. Your replacement rules
- After the model, last. You wrote these and the model did not. If your company is spelled ChargeBee, that must beat whatever the model produced.
Stage 1 has a known limit: it scans up to three words at a time, so "Chat G P T" comes out as "ChatGPT T". Biasing the recogniser avoids that.
Why use a small fine-tuned model instead of a big prompted one?
Because the property you need most, restraint, did not come from size. A hosted 9B model and an untuned 0.8B model both scored 89.7% on restraint, at eleven times the size. A hosted frontier model scored ten points worse on restraint than the 0.8B fine-tune.
Training is what moved the numbers. Against the same untuned base, at the same file size, quantisation, prompt and hardware, edit accuracy went from 4.9% to 48.8%. The overall score rose 23.4 points (95% interval +16.3 to +30.3).
Restraint went from 89.7% to 92.6%, a gap this test set cannot resolve. The honest claim is that restraint did not fall.
Examples of a boundary work. Instructions about the boundary do not.
If you prompt rather than train, two settings do most of the damage. Capping output tokens cuts long transcripts short. Leaving reasoning on fails every already-correct case, because any reasoning text means the output no longer matches the input exactly.
How do you know your cleanup is helping?
Score restraint and edit accuracy separately, and put a do-nothing baseline next to them. Without the baseline you cannot read your own numbers.
Restraint is the share of already-correct transcripts returned untouched. Edit accuracy is the share of transcripts needing a change that came back exactly right.
On the unweighted mean of the two, returning every input unchanged scores exactly 50.0%. Four of the seven systems tested landed below it, and two of those look safe if you read only the restraint column.
- Use exact string match, with no partial credit. Forgiving every formatting-only miss moved the leaders by about three to four points each and did not change the top three.
- Report both halves next to any average. A ranking by restraint alone put a 9B model above a hosted frontier model that beat it overall by a resolved margin.
- Check agreement before trusting a model as judge. Four frontier models from four vendors judged the same disputed cases and agreed on too few to use. That tier was dropped, and no judge score was published.
Publish a damage figure too. Content damage, the share of transcripts that lost a word the speaker said, is 10.7% for SpeakoFlow Mini.
How does this compare with one hosted model doing everything?
It is a tie overall. Under one short prompt with reasoning off, the local two-stage setup leads a hosted frontier model by 5.8 points, with a 95% interval of -1.5 to +12.9 that contains zero. Only on passages of 500 words and up is the lead resolved, at +20.9 points.
| Rules plus a 0.8B local model | One hosted frontier model | |
|---|---|---|
| Overall score | 70.7% | 65.0% |
| Restraint | 92.6% | 82.4% |
| Passages of 500+ words | Ahead by a resolved margin | Weakest band |
| Pattern fixes | About a millisecond, deterministic | Charged as inference on every call |
| Unanticipated cases | Weaker | Better, and noticeably so |
| Languages other than English | Untested | Broad coverage |
| Network required | No | Yes |
The hosted model wins on odd cases no category anticipated, which a much larger model reads better. It was also not tested at its best: both got the same short prompt with no reasoning budget, the setup the small model was trained for. On the subset left after an internal audit removed defective cases, its edit accuracy comes out ahead, 55.9% against 54.4%.
So small does not beat large. Rules in the weights beat the same rules in a prompt.
How does AI cleanup work in SpeakoFlow 2.0?
It is off until you turn it on. Once enabled, it runs either on its own shortcut (the dictation keys plus Shift) or on every dictation, according to the SpeakoFlow README.
| Platform | Dictate | Dictate and clean up |
|---|---|---|
| Windows | Left Ctrl + Left Win | Left Ctrl + Left Win + Shift |
| macOS | Fn | Fn + Shift |
| Linux | Ctrl + Space | Ctrl + Shift + Space |
- The model. SpeakoFlow Mini is a 795 MB download that runs on your computer and handles English for now. Any other local or cloud model can do the job instead, including Apple Intelligence on Apple silicon Macs.
- Writing styles. Professional, Friendly, Concise, Formal, Casual, or one you write yourself. The 2.0.1 release fixed styles so they change the text, and notes that SpeakoFlow Mini and other fine-tuned models mostly ignore them. The Cleanup page says so and offers Change model.
- Thinking. 2.0.1 added a Thinking setting for cloud reasoning models, with Off as the default, which avoids the reasoning problem above.
- Short dictations. Since 2.1.0, cleanup on every dictation skips anything shorter than 15 words and pastes it as you said it, so a quick message never waits for the model. Change the length, or turn it off, on the AI cleanup page. The dictate-and-clean-up shortcut always cleans.
- Privacy. With a local model, cleanup stays on your computer. With a cloud model, your transcript goes to that provider.
More on what else shipped is in the SpeakoFlow 2.0 post. If you are still choosing a dictation app, see the free and open-source Wispr Flow alternatives.
Frequently asked questions
Why not send the transcript to one good language model?
A model told to drop the word um will sometimes rewrite the sentence around it. Filler, stutters and company names are lookups. In the published evaluation, eight regular expressions handled about a fifth of the transcripts that needed an edit, with no content loss.
Does the order of the cleanup stages matter?
Yes. Vocabulary correction and filler removal run before the model, so it never has to reason about them. Spoken emoji and your own replacement rules run after it, so the model cannot overrule them.
Why a small fine-tuned model instead of a big prompted one?
Restraint comes from training, not size. A hosted 9B model and an untuned 0.8B model both scored 89.7% on restraint. Fine-tuning the 0.8B model took edit accuracy from 4.9% to 48.8% at the same file size, prompt and hardware.
How do I tell whether my dictation cleanup is helping?
Score restraint and edit accuracy separately, and add a baseline that returns every input unchanged. On the mean of the two that baseline scores exactly 50.0%, and four of the seven systems tested landed below it.
Can I use the rules layer without the model?
Yes. It is published under MIT with Python and TypeScript implementations, a written specification and a conformance suite of 79 fixed input and output pairs. It needs no model and no GPU.
Does SpeakoFlow clean up dictation automatically?
Only if you turn it on. AI cleanup is off by default. Once enabled, it runs on its own shortcut (the dictation keys plus Shift) or on every dictation, using SpeakoFlow Mini, a 795 MB English-only local model, or any other local or cloud model you choose.
Disclosure: SpeakoFlow is my product, and I built the rules layer, the model and the evaluation they are scored on. October update: added how AI cleanup works in SpeakoFlow 2.0 and shortened the text. The benchmark numbers are unchanged.
Both stages, running on your own machine
The rules layer was extracted from SpeakoFlow, and SpeakoFlow Mini runs on your computer. The rules layer also works on its own in any project, in Python or TypeScript.
Windows, macOS, and Linux. MIT licensed. No account, no telemetry.