Updated October 2026 to cover the Dictation API, which runs both stages described here in one request.
Here's a sentence the way a speech model receives it, with nothing taken out:
um, so, the patient — the patient is tired
And the same sentence after cleanup:
The patient is tired.
Both are correct. They answer different questions. The first is a record of what was said; the second is what the speaker meant to write down, and it's the one that belongs in a chart note, a Jira ticket, or a text field a human is staring at.
Nobody wants to copy and paste their own ums.
Dictation cleanup is a second pass that runs after speech recognition: a language model removes filler, resolves self-corrections, and applies punctuation, leaving the speaker's meaning intact. AssemblyAI's Dictation API runs both stages in one request, on up to 20 minutes of audio, and returns the verbatim transcript and the cleaned text side by side.
The gap between those two outputs is where dictation products live, and it's less mysterious than it looks. Two separate jobs happen between the moment someone speaks and the moment finished text appears. They run in a fixed order, they fail in completely different ways, and confusing them is why so much do-it-yourself dictation feels broken in a way teams can't diagnose.
This page is the map: every stage, in order, including the one that can't be fixed downstream no matter what you put in your cleanup prompt.
Stage 0 — Getting the words right in the first place
Recognition happens before cleanup. That's not a technicality, it's the argument: cleanup inherits whatever recognition got wrong. So the first controls to reach for are the ones that shape what gets heard, not how it reads.
Two ideas do jobs that sound similar and aren't, and the distinction is worth memorizing before you write a line of code:
A prompt tells the speech model what it is about to hear — the setting and the vocabulary. A rewrite instruction tells a language model what to do with the transcript after it is written down.
Contextual prompting is the transcription-context control. You describe the setting and the terms the model should expect: a cardiology follow-up, a standup for a Kubernetes team, a support call about one product line. It's a capability of the model rather than a keyword list, and describing the domain generally buys you a whole vocabulary neighborhood instead of one term at a time.
Keyterms prompting is the sharper instrument. It takes terms you already know are coming — package names, drug names, the six people on the account — and biases transcription toward them. The Dictation API prompting and keyterms guide covers building that list without stuffing it, and the Sync API version covers the same controls for verbatim transcripts.
Conversation context carries prior turns of dialogue, either side, so a follow-up utterance is heard against what came before it rather than in isolation.
On the Dictation API, the two controls have names and limits: stt_prompt describes the setting (up to 6,000 characters), and keyterms_prompt lists exact terms (up to 100 terms, 8,000 characters in total). The rewrite instruction is a separate field, llm_instruction, because it's a separate job. Language is a third control: language_codes steers recognition toward the languages you expect. On the Sync API it still applies when you set a custom prompt, so you don't have to choose between steering vocabulary and pinning language.
What disfluencies are, in six categories
A disfluency is any element of spontaneous speech that carries no content the speaker intended to write down — a hesitation sound, a repeated word, an abandoned phrase, a restart. Fluent speech is full of them; written text almost never is. That mismatch is the whole reason dictation cleanup exists.
They aren't one thing, and the categories fail differently. Six worth naming:
Filled pauses are the non-lexical sounds people make while thinking: uh, um, er, ah. Zero content, safest to remove. "um, can we push the deploy to Thursday" becomes "Can we push the deploy to Thursday?"
Discourse markers are real words used as verbal padding — you know, I mean, I guess, plus leading so, well, right, and okay. Harder, because the same words carry meaning elsewhere. In "So, right, I mean the invoice went out Monday," all three openers are padding. In "Right, so the invoice was wrong," right is agreement, and dropping it changes what the sentence says.
False starts are an abandoned fragment followed by a restart: "we should ref-, we should refactor the auth layer first." Cleaning one means dropping the abandoned attempt and keeping the completed one, which requires recognizing that both spans are the same attempt.
Stammered repeats are immediate, unintended duplication. "Send it to to the finance team" is one to. "It's a a really tight deadline" is one a. The tell is adjacency — the repeat sits right next to itself with nothing in between.
Self-corrections are the hardest case, because some carry the point of the sentence. "Book the room for Thursday, sorry, make that Friday" has to come back as "Book the room for Friday" — the correction is the content, and a system that keeps both has produced a wrong meeting. Compare "the, uh, the north campus," where nothing is being corrected at all; that's a filled pause wrapped in a repeat. Telling those apart is the difference between a cleanup pass you'd trust with a calendar and one you wouldn't.
Trailing abandonment is a phrase started and dropped, with the speaker moving on rather than restarting: "I'll loop in legal if we need to — anyway, ship it." There's no completed version to fall back on, which makes it the category most likely to be over-trimmed. The safe behavior is to cut the broken-off fragment and leave the surviving clause intact.
Two of the six — self-corrections and trailing abandonment — are judgment calls. The other four are mechanical. Evaluate any cleanup system, ours or yours, on the two, because everyone gets the four right.
The parameter direction, stated carefully
On pre-recorded audio, AssemblyAI-STT-3.7 keeps filler words by default, and setting disfluencies: false removes them. The name reads like a switch you flip to get rid of them. It's a switch you flip to keep them. If your output has more ums than you expected, check that flag first.
Verbatim, clean verbatim, and finished text
Transcription people use three levels, and it helps to name them before choosing one.
Verbatim is every word as spoken, including fillers, repeats, and false starts. It's the record. On the Dictation API, that's the text field, which the rewrite never touches.
Clean verbatim removes the filled pauses and stammered repeats but keeps the speaker's wording and order. Nothing is rephrased.
Finished text goes one step further: self-corrections resolved to what the speaker landed on, punctuation and capitalization applied, and optionally reshaped to a format you asked for. That's llm_response, from either the default cleanup or your own instruction.
Most products want finished text. Most audits want verbatim. Getting both back from one request means you never have to pick in advance.
Dictate a messy sentence and see the verbatim transcript next to the finished text. No setup, no code.
Stage 1 — Recognition
Short to describe, impossible to skip.
The transcript doesn't come from a trimmed-down variant tuned for speed. That matters more than it sounds like it should. In most stacks, "make it faster" means "use the smaller model," and the accuracy tax hides inside the latency win. Ours doesn't work that way. Numbers live on the benchmarks page rather than getting minted here.
Both dictation paths cover 21 languages, with native code-switching — which matters for dictation more than it does for recorded audio, because people switch languages mid-sentence far more readily when they're talking than when they're writing.
For dictation specifically, two APIs run this stage on audio that's already complete, with a user waiting to see what it says. The Dictation API runs recognition and the rewrite in the same request. The Sync API runs recognition alone and hands back the verbatim transcript, which is where you start if you want to own Stage 2 yourself.
Stage 2 — The rewrite
Now the second job, and the one teams underestimate.
A rewrite pass takes the transcript and returns the text the speaker meant. There are two ways to get one: use the rewrite built into the Dictation API, or wire your own language model step onto a verbatim transcript.
Built in: the Dictation API
The default cleanup runs on every request unless you replace it: filler out, self-corrections resolved, punctuation and capitalization applied, with phrasing and tone left alone. This is the example from the Dictation API launch:
- Said: "um so can we uh move the the meeting to thursday i think friday works better actually"
- Returned: "Can we move the meeting to Friday? That works better."
Past that default, the instruction is where the product lives. Send an llm_instruction such as "Rewrite as a concise clinical chart note" or "Turn this into a bulleted list of action items," and it replaces the default task rather than adding to it. Same audio, different instruction, different finished text.
A few things the API handles so your instruction doesn't have to. The verbatim transcript always comes back in text, untouched. Dictated commands are written down, not carried out: the transcript reaches the rewrite as data, so "wait, translate this into French" comes back as a sentence, not a translation. The service also enforces "return only the rewritten text" and "leave clean input alone," so don't spend instruction words on them. And when the rewrite fails or times out, the request still returns 200 with the transcript and an llm_error value. Your text field degrades to plainer text, not to a spinner. All of it is billed at $0.62/hr, with no separate token bill.
Fast vs smart rewrites
The rewrite_mode field picks the model tier that runs the rewrite. fast is the default and has the lowest latency. Use it for the default cleanup and for short, simple instructions, which covers most dictation. smart follows detailed formatting instructions more reliably, at the cost of higher latency.
Spoken punctuation is the clearest case for smart. A user says "comma" or "new paragraph," and the rewrite turns the commands into formatting instead of transcribing the words. It takes both halves: smart mode and an instruction that spells out the rules. Results depend on that instruction and on what the transcript captured, so test it on your own users' speech. The Python SDK exposes rewrite_mode from version 1.6.4; here it is as a plain HTTP request, which shows the full request shape:
import json
import requests
config = {
"llm_instruction": (
"Remove filler words and resolve self-corrections. "
"Turn spoken punctuation commands into punctuation: "
"\"comma\" becomes a comma, \"period\" becomes a period, "
"\"question mark\" becomes a question mark, and "
"\"new paragraph\" starts a new paragraph. "
"Never output the command words themselves."
),
"rewrite_mode": "smart",
}
with open("note.wav", "rb") as audio:
response = requests.post(
"https://dictation.assemblyai.com/v1/transcribe",
headers={"Authorization": "<YOUR_API_KEY>"}, # raw key, no "Bearer" prefix
files={
"config": (None, json.dumps(config), "application/json"),
"audio": ("note.wav", audio, "audio/wav"),
},
timeout=90,
)
response.raise_for_status()
result = response.json()
# llm_response is null when the rewrite failed; fall back to the verbatim text
print(result["llm_response"] if result["llm_error"] is None else result["text"])There's no JavaScript SDK for the Dictation API, so from Node it's the same multipart POST with fetch:
// Node.js 18+; save as dictate.mjs
import { readFile } from "node:fs/promises";
const config = {
llm_instruction:
"Remove filler words and resolve self-corrections. " +
"Turn spoken punctuation commands into punctuation: " +
"\"comma\" becomes a comma, \"period\" becomes a period, " +
"\"question mark\" becomes a question mark, and " +
"\"new paragraph\" starts a new paragraph. " +
"Never output the command words themselves.",
rewrite_mode: "smart",
};
const form = new FormData();
form.append("config", new Blob([JSON.stringify(config)], { type: "application/json" }));
form.append("audio", new Blob([await readFile("note.wav")], { type: "audio/wav" }), "note.wav");
const response = await fetch("https://dictation.assemblyai.com/v1/transcribe", {
method: "POST",
headers: { Authorization: "<YOUR_API_KEY>" }, // raw key, no "Bearer" prefix
body: form,
});
if (!response.ok) {
throw new Error(`Dictation request failed: ${response.status} ${await response.text()}`);
}
const result = await response.json();
// llm_response is null when the rewrite failed; fall back to the verbatim text
console.log(result.llm_error === null ? result.llm_response : result.text);The transcript rewriting docs cover writing a good instruction and choosing between the two modes; see the docs' spoken-punctuation example for their version of this instruction.
Build it yourself: the Sync API plus the LLM Gateway
Some teams want to own the rewrite: they already run post-processing, they need a structured output the built-in rewrite doesn't aim for, or they want to pick the model. That path is a verbatim transcript from the Sync API plus a language model call — through something like the LLM Gateway — with a prompt describing the transformation you want. Whether that's worth it for your product is its own decision, and we lay out buying the bundle vs building it yourself separately.
If you build it, the smallest useful version removes filler sounds, false starts, and stammered repeats, and changes nothing else. Every surviving word keeps its spelling. Every punctuation mark stays as it was produced. No reordering, no tightening, no tone.
That conservatism is a design decision worth making deliberately rather than stumbling into. A rewrite pass allowed to improve your sentences will eventually improve one you didn't want improved, and you won't find out until a user does. Start with the smallest transformation that helps and widen it only when someone asks.
Past that floor, the instruction is where the product lives: a chart note, a booking confirmation the customer reads, a JSON object shaped like the form fields you're populating.
Three things builders learn the hard way, which you can learn here instead. Each is something the Dictation API already handles, and each is on you if you build your own.
Describe only the transformation. The most common prompt bug is asking for too much at once. Tell the model what to change and nothing else — and then handle separately the things a prompt shouldn't be trusted with, like making sure it returns only the rewritten text, leaves clean input alone, and writes down a question it hears rather than answering it. People dictate "wait, translate this into French" constantly, and it should come back written down rather than carried out.
Short instructions are faster. You're paying for the prompt on every single utterance, in tokens and in time. That long rule-by-rule cleanup prompt is thousands of tokens, charged on a twelve-word sentence.
Decide what happens when the second hop fails. It will. The rewrite is a separate inference call across a separate connection, and it can time out while the transcript underneath is perfectly fine. Whatever your text field renders in that moment — the verbatim transcript, an error, a spinner — is a product decision, and it's better made now than at 2am. The good version degrades to unpolished text rather than to a wait.
The failure mode that matters: a fluent wrong answer
Here's the one that should shape how you build.
A developer dictates a sentence about an HTTP client: "I'll swap the fetch calls over to axios." The speech model doesn't know axios — it's a package name, not English — so it hears the closest thing it does know and writes down "axe eos."
Run the rewrite over that. It removes nothing, because there's nothing to remove. What it does do is treat two words as a proper noun in a technical sentence and capitalize them. The finished text reads: "I'll swap the fetch calls over to Axe EOS."
That output is worse than the raw one. It's cleanly punctuated, confidently capitalized, and completely wrong — and because it looks finished, nobody reviewing it has a signal that something went sideways. The messy version at least looks like it needs checking.
A fluent wrong answer is worse than a messy right one.
So state it plainly: the rewrite polishes, it does not correct. It reformats the words it was handed. It cannot recover a word that was never heard, because that word isn't in its input — there's nothing in "axe eos" from which axios can be reconstructed. Adding "the user means the axios library" to your rewrite instruction does nothing, because the failure already happened one stage earlier.
The fix goes upstream, back to Stage 0. Put axios in your keyterms. Describe the setting in a prompt — "a developer discussing a JavaScript codebase" buys you the whole vocabulary neighborhood, not one term. That's the difference between fixing a class of errors and patching one instance. It's the same upstream work behind dictating prompts to coding agents, where package names are most of the sentence. Keep the list to terms you've actually seen misheard, though, because keyterm prompting can backfire when it's padded.
This is why the Dictation API takes keyterms and a prompt in the same request as the rewrite: cleanup only works if the transcript is right.
It's also why aggregate word error rate is the wrong instrument here. Miss one word in forty and your WER looks fine; if that word was the drug name or the customer's surname, the output is unusable. Entity accuracy tracks what users notice, and it's worth understanding how speech-to-text accuracy is measured before picking a number to hold a vendor to.
Steer recognition with a prompt and keyterms, and see what lands before any rewrite runs. Keyterms and prompts are included in the Dictation API's $0.62/hr.
When you should not clean up
Cleanup is what most products want. It isn't what every product wants, and the exceptions aren't edge cases.
Medical records sometimes need verbatim, because formatting can carry meaning — especially when the note is about to be read by another model, where a removed hesitation or a normalized phrase changes what gets extracted. A clinical dictation workflow feeding a summarizer is a different requirement from one feeding a human reader.
Physicians are also trained, in medical school, to speak their punctuation. "patient open parentheses Andrew close parentheses is tired" is a rendering instruction, not a filler pattern, and the expected output is patient (Andrew) is tired. Untraining that habit is a non-starter. If the goal is turning those spoken commands into formatting, smart mode with an explicit instruction is the place to start, tested against your own clinicians' speech. But some teams go further and want zero model-generated punctuation at all, with deterministic conversion of spoken punctuation commands and nothing else. That's a legitimate spec, and incompatible with a rewrite pass by design. Legal and compliance work lands in the same place for the same reason: the record has to be the record.
When that's the requirement, the answer is simple: don't run a rewrite stage. Take the transcript. On the Dictation API, that's the text field, which comes back verbatim on every request. On the Sync API, it's the only thing that comes back.
Where the words themselves carry the clinical risk, the answer is still upstream. Medical Mode is the domain-specific version of Stage 0 — one parameter, "domain": "medical-v1", on Universal-3.5 Pro — and it misses roughly 20% fewer medical entities than the base model. It covers English, Spanish, German, and French. One scoping note: Medical Mode isn't available on the Sync or Dictation APIs. For clinical audio that needs it, use Universal-3.5 Pro on the Pre-recorded API or AssemblyAI-STT-3.7-Realtime on the Realtime API. Contextual prompting compounds it: feeding a patient's prior-visit note cut missed medical terms by 31% in an internal healthcare test, even when the note came from an earlier visit.
For teams handling PHI: AssemblyAI enables covered entities and their business associates subject to HIPAA to use the AssemblyAI services to process protected health information (PHI). AssemblyAI is considered a business associate under HIPAA, and we offer a Business Associate Addendum (BAA) that is required under HIPAA to ensure that AssemblyAI appropriately safeguards PHI.
None of that is the rewrite doing anything. It's recognition getting the word right the first time, which is the only place the word can be gotten right.
What the frontier looks like
The interesting problem in dictation cleanup isn't removing more. It's knowing what not to remove.
That's not philosophy. When we've tuned cleanup prompts, most of the gains came from rules about what to keep — the content words a naive filler-stripper eats, the right that means agreement rather than padding, the second half of a self-correction. The improvements came from teaching the pass to be more careful, not more aggressive.
Which suggests the ceiling on cleanup quality isn't model capability. It's specification. The teams shipping dictation features nobody complains about are the ones who wrote down, explicitly, what their product is never allowed to touch, then tested against that list instead of a word error rate. If you're comparing models for your own rewrite step, Voice Standard Bench ranks them on real audio. If you take one action after reading this, make it that list — everything else in dictation is downstream of it.
Earlier in the decision than that? What a dictation API is covers the shape of the request and when to pick the Dictation API over the Sync API.
Recognition and cleanup in one call, with the verbatim transcript always returned. Free API key, no sales call.
Frequently asked questions
How does AI dictation cleanup work, turning spoken filler words into clean written text?
AI dictation cleanup runs as a second pass after speech recognition: the speech model produces a verbatim transcript, then a language model removes disfluencies, resolves self-corrections, and applies punctuation or whatever transformation you asked for. AssemblyAI's Dictation API runs both stages in one request and returns the verbatim transcript and the cleaned text together. The rewrite never re-listens to the audio, so it can polish text but cannot change which words were recognized.
Can dictation cleanup fix a word the speech model got wrong?
No. Cleanup reformats the transcript it receives, so a misheard term comes back cleanly formatted and still wrong — axios heard as "axe eos" becomes "Axe EOS," which reads more authoritative than the raw version and is just as incorrect. The fix is steering recognition upstream with a prompt and keyterms, not adding rules to the rewrite instruction.
What's the difference between a verbatim transcript, clean verbatim, and finished text?
A verbatim transcript keeps every word as spoken, including fillers, repeats, and false starts. Clean verbatim removes fillers and stammered repeats but keeps the speaker's wording, while finished text also resolves self-corrections and applies punctuation and formatting. The Dictation API returns verbatim in its text field and finished text in llm_response from the same request.
How do I remove filler words from a transcript?
For dictated clips, AssemblyAI's Dictation API removes filler words by default as part of its standard cleanup, and still returns the verbatim transcript alongside. On pre-recorded audio, AssemblyAI-STT-3.7 keeps filler words by default, so set disfluencies: false to remove them. If you run your own rewrite step on a Sync API transcript, instruct the language model to remove fillers and change nothing else.
How do I improve accuracy for custom vocabulary and industry jargon in a dictation API?
Describe the setting in a prompt and list the specific terms you expect as keyterms; on AssemblyAI's Dictation API those are stt_prompt and keyterms_prompt, both included in the $0.62/hr rate. Describing the domain generally primes a whole vocabulary neighborhood, while keyterms lock in exact spellings. Start without keyterms and add only terms you've seen the model miss, because a padded list causes overcorrection.
When should you keep a verbatim transcript instead of cleaned-up text?
Keep verbatim when the exact words are the deliverable: medical records that feed downstream models, legal and compliance recordings, and any workflow where a removed hesitation could change what gets extracted. It also applies when users need deterministic handling of spoken punctuation rather than a model's interpretation. The Dictation API always returns the verbatim transcript in its text field, so you can store the record and show the finished text from the same request.