New AssemblyAI-TTS-1: Text-to-speech for voice agents. Learn more
Insights & Use Cases

What is a dictation API? How voice input becomes finished text

A dictation API turns spoken input into finished text in a single request. How it works, how the Dictation API differs from the Sync API, and when to use each.

Abstract green half-sphere illustration

Written by

Kelsey Foster

Published on

27 October 2026

Updated October 2026: the Dictation API now accepts finished recordings up to 20 minutes, and you can pick a fast or smart rewrite.

A dictation API takes a short clip of someone speaking and returns the text they meant to write: filler removed, self-corrections resolved, punctuation applied, in one request. AssemblyAI's Dictation API does this on Universal-3.5 Pro for $0.62/hr, and returns the verbatim transcript alongside the cleaned text.

A plain speech-to-text API, including a fast single-request one like our Sync API, returns what was said. A dictation API returns what was meant.

That difference matters because dictation is the one speech feature where the user watches.

Every other use of speech-to-text happens offstage. A meeting gets transcribed while everyone's still talking. A call gets analyzed after it ends. A podcast gets captioned overnight. Nobody sits there staring at the place the words will appear.

Dictation is different. The user holds a key, says a sentence, lets go, and looks directly at the cursor. There's no loading state that makes 900ms acceptable, because there's nothing else on screen to look at. Either the words land fast enough to feel like typing, or the feature feels broken. And if the words land with every "um" still in them, it feels broken in a different way.

So let's define what a dictation API actually is, walk through what happens between the microphone and the cursor, and get specific about the numbers that decide whether the thing feels good.

What is a dictation API?

A dictation API is a speech-to-text interface built for spoken input that has to come back as finished text while a person waits. You send one recording of someone talking in a single request, and you get back text that's ready to drop into whatever they were writing. No job to poll, no WebSocket to hold open, no partial results to reconcile.

Two things separate it from a general transcription API. The first is the request shape: one utterance in, one response out, fast enough that a human is still looking at the screen. The second is the output. Transcription models are verbatim by design, so you get the "um," the restart, and "Thursday, actually Friday." A dictation API returns what the speaker landed on.

AssemblyAI's Dictation API returns both in the same response. The text field holds the verbatim transcript, never altered. The llm_response field holds the finished text. You show one, keep the other, and never have to guess which you're holding.

The category name confuses people because dictation used to mean desktop software: Dragon, the Windows dictation panel, the microphone key on a phone keyboard. Those are products. A dictation API is the infrastructure underneath a product like that, which you use to build voice input into your own app: a push-to-talk key in an IDE, a mic button in a CRM, a clinician tapping to record a note, a voice command in a browser extension. AI dictation apps work the same way. Blurt, our free open-source Mac dictation app, is built on the Dictation API.

Dictation vs. transcription vs. real-time streaming

Three request shapes cover almost every speech-to-text job, and picking the wrong one is the most common early mistake. The differences aren't about accuracy. They're about the shape of the audio, who's waiting for the result, and what they need back.

Dictation (Dictation API or Sync API)Pre-recorded (async)Real-time (streaming)
Audio shapeOne finished utterance or noteFull recordingContinuous live audio
Typical lengthA few seconds to 20 minutes (both APIs, for a finished recording; 2 minutes when uploading while recording)Minutes to hoursOpen-ended
TransportSingle HTTP requestSubmit, then poll or webhookWebSocket
ReturnsFinished text plus the verbatim transcript (Dictation API), or the verbatim transcript (Sync API)Full transcript when the job finishesPartials as the person speaks, finals as turns end
Who's waitingThe user, right nowNobodyThe user, mid-sentence
Good forPush-to-talk, voice notes, voice commands, dictated fields, prompts to agentsMeetings, calls, media, archivesLive captions, voice agents, ambient capture
AssemblyAI APIDictation API or Sync APIPre-recorded APIRealtime API

The line between dictation and real-time is the one people get wrong most often, and there's a simple test: does your UI show text while the person is still talking, or only after they stop?

If words appear mid-sentence, you want streaming over a WebSocket. If text appears after the user releases the key, you want the dictation shape. Using a WebSocket for it means you've taken on connection lifecycle management, partial-result handling, and turn detection to solve a problem that was one HTTP request.

Dictation API vs. Sync API: which one do you need?

Both run on Universal-3.5 Pro. Both take a finished clip in one HTTP request. The difference is what comes back.

The Sync API returns a verbatim transcript, with per-word timing and confidence, in about 134 ms at p50 on a 2-second clip. It doesn't clean anything up. That's the right call when you want the transcript itself: a voice agent that runs its own turn detection, a voice command you'll parse, or a pipeline where your own language model does the rewriting and you want full control over that step, including passing prior conversation turns as context.

The Dictation API takes the same utterance and returns what the speaker meant to send, with self-corrections resolved and filler gone, plus the verbatim transcript next to it. Recognition and cleanup happen in one call, at one rate.

Sync APIDictation API
OutputVerbatim transcript (text, words, confidence)Finished text (llm_response) plus verbatim transcript (text)
CleanupNone. Bring your own LLM stepDefault cleanup, or your own llm_instruction. Fast or smart rewrite mode
Clip limit80 ms to 20 minutes per finished recording, 256 MB; 120 seconds when uploading while recordingUp to 20 minutes per finished recording; 120 seconds when uploading while recording
Languages3232
Price$0.30/hr (prompting +$0.05/hr)$0.62/hr, with keyterms, prompting, and output instructions included
Best forThe transcript itself, or your own cleanup pipelineText going straight into what the user is writing

The short version: reach for Sync when you want the transcript itself, and Dictation when the text is going straight into whatever your user is writing. We go deeper on the tradeoffs in Sync API or Dictation API?

Hear the Difference Cleanup Makes

Dictate a messy sentence and see the verbatim transcript and the finished text side by side. No code required.

Try the Dictation playground

How a dictation API works, step by step

Here's what happens between the key press and the finished text, using AssemblyAI's Dictation API as the concrete example. The Sync API follows the same path minus the rewrite.

  1. Capture. Your client opens the microphone on key-down and starts buffering audio. Format is the practical constraint. Most browsers hand you WebM or Ogg/Opus, and the upload-while-recording path takes WAV or raw 16-bit PCM only, so you convert on the client. A finished recording sent in one piece can stay in WebM, Ogg/Opus, AAC, MP3, M4A, or FLAC.
  2. Upload while recording. Don't wait for key-up to start the request. On POST /v1/transcribe/live, you send the config part first, then stream audio up as it's captured, for up to 120 seconds. By the time the user lets go, most of the utterance is already on the server. For a recording you already hold in full, POST /v1/transcribe takes up to 20 minutes and 256 MB, though nothing is transcribed until the upload finishes.
  3. Recognize. Universal-3.5 Pro transcribes the whole clip at once. Because the utterance is complete, the model can use the end of the sentence to make sense of the beginning. That's an accuracy advantage streaming doesn't have, since a streaming model has to commit to words before it knows how the sentence ends.
  4. Rewrite. The default cleanup runs automatically: filler out, self-corrections resolved, punctuation and capitalization applied. Send an llm_instruction and it replaces the default with your own rewrite. Set rewrite_mode to fast (the default, lowest latency) or smart for detailed formatting instructions.
  5. Return. You get text (verbatim), llm_response (finished), per-word confidence, an overall confidence value, the audio duration, a session_id, and request_time_ms. Log the session_id on every request, not just failures. It's the first thing support asks for.

In Python, the SDK wraps the upload-while-recording path in a few lines:

import assemblyai as aai

aai.settings.api_key = "<YOUR_API_KEY>"

config = aai.DictationConfig(keyterms_prompt=["Priya", "Q3 roadmap"], rewrite_mode="fast")
result = aai.DictationTranscriber().transcribe_live("clip.wav", config)

print(result.text)        # verbatim, never altered
print(result.final_text)  # cleaned text; falls back to text if the rewrite timed out

Python is the only SDK for the Dictation API today. Every other language calls it over plain HTTP: one POST with a config part and an audio part, authenticated with your API key as-is, no Bearer prefix. The Python SDK exposes rewrite_mode too (version 1.6.4 and later), and over HTTP it's a field in the same config part. Here's a finished WebM voice note, sent the same way from any language:

import json

import requests

API_KEY = "<YOUR_API_KEY>"

config = {
    "keyterms_prompt": ["Priya", "Q3 roadmap"],
    "rewrite_mode": "fast",  # or "smart" for detailed formatting instructions
}

with open("voice-note.webm", "rb") as audio:
    response = requests.post(
        "https://dictation.assemblyai.com/v1/transcribe",
        headers={"Authorization": API_KEY},  # raw key, no "Bearer" prefix
        files={
            "config": (None, json.dumps(config), "application/json"),
            "audio": ("voice-note.webm", audio, "audio/webm"),
        },
        timeout=300,
    )

response.raise_for_status()
result = response.json()

print(result["text"])  # verbatim transcript, always present
if result["llm_error"] is None:
    print(result["llm_response"])  # finished text
else:
    print("Rewrite unavailable:", result["llm_error"])

The Dictation API quickstart has the full config and response reference, plus cURL and Node.js versions.

Ship Dictation This Week

One request, finished text, $0.62/hr all in. Use your free API key, no sales call.

Sign up free

Why latency is most of the product

Most speech-to-text decisions come down to accuracy. Dictation is the exception, because dictation has a psychological deadline that other use cases don't.

Text that appears in roughly a tenth of a second reads as instant, the same range as a keystroke registering. Push past half a second and the user notices the wait. Push past a second and they start wondering whether it worked, which is the moment a feature stops feeling like a feature.

Here's where the two APIs land. On the Sync API, a 2-second clip round-trips in about 134 ms at p50, against 5 to 6 seconds for the same clip through an async submit-and-poll pipeline. The Dictation API adds a rewrite on top and still returns typical short clips in under a second, cleanup included. The launch benchmark measured an average of 0.36 seconds to finished text across ten consecutive requests. Every response carries request_time_ms, so you can check that against your own traffic instead of taking our word for it.

Here's the part that surprises teams: a meaningful share of the budget often isn't the model at all. A single HTTP request means connection setup sits inside your latency path. If the HTTPS connection isn't already open when the user releases the key, the request first negotiates one: DNS resolution, a TCP handshake, then a TLS handshake, a round trip each. Locally that's tens of milliseconds. Intercontinental, it can exceed the transcription itself.

None of that work depends on the audio, so you can pay for it while the user is still talking. Both APIs expose a /warm endpoint for exactly this. Call it the moment recording starts, from the same HTTP client you'll transcribe with, and the request that follows skips the handshake. Two details bite people. Warming is per host, so warm the endpoint you're about to call, including a regional one. And on the Sync API, the warm call needs the X-AAI-Model header or it returns 404. The Dictation API's /warm doesn't.

The rewrite is bounded too. If cleanup misses its internal deadline (five seconds, per the launch post), you still get HTTP 200 with the verbatim text and llm_error: "timeout". The worst case your user sees is plainer text than usual, not an error screen.

What a dictation API has to get right besides speed

Fast and wrong is still wrong. Two accuracy problems show up specifically in dictation.

Proper nouns. General models handle general speech well. What they can't know is your users' vocabulary: colleagues' names, product names, internal shorthand, drug names, matter numbers. Every serious dictation API offers some way to bias recognition toward a known vocabulary. On the Dictation API that's keyterms_prompt (up to 100 terms) and stt_prompt, a plain description of the audio (up to 6,000 characters), both included in the $0.62/hr rate. Context is worth the effort. On a 20,000-call benchmark, scenario-level context cut word error rate by about 10% and detailed context by about 21% versus no prompt, with the largest gains on names and identifiers.

The teams that get the most out of this are the ones already holding context they haven't thought to pass:

"Since moving to AssemblyAI, we've seen a meaningful improvement in the confidence tail of our production transcripts....What stands out is not just the model quality, but the way [they] let us bring real meeting context into transcription, from calendar titles to organizations, domains, and participant names, so recruiting conversations come through with the nuance our customers depend on."

— Shahriar Tajbakhsh, Co-founder and CTO, Metaview

A word of caution that bites people: start with no keyterms at all. Universal-3.5 Pro is tuned to work without them, and a long list padded with common words causes overcorrection, where the model starts hearing your terms in audio that doesn't contain them. Add terms only for words you've watched it get wrong in your own audio.

Multiple languages in one inbox. Dictation is where multilingual products stop being able to assume English. People switch languages mid-sentence far more readily when they're talking than when they're typing. The Dictation API and the Sync API both cover 32 languages with native code-switching, so a sentence that switches mid-utterance comes back with every word in the language it was spoken. Pass language_codes to steer toward the languages you expect.

Cleanup: from what was said to what was meant

A correct transcript of real speech includes the "um," the false start, the repeated word. That's accurate, and it's almost never what anyone wants typed into a text field. Here's the gap, using 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."

The default cleanup does that with no configuration. When you need a different shape, send an llm_instruction such as "Turn this into a bulleted list of action items." It replaces the default task rather than adding to it, and the verbatim transcript still comes back untouched in text. Dictated commands are written down, not carried out: a user who says "translate this into French" gets that sentence back as text.

The rewrite_mode field picks the model tier that runs the rewrite. fast is the default, with the lowest latency, and it handles the default cleanup and short instructions well. smart follows detailed formatting instructions more reliably, at higher latency. Spoken punctuation is the clearest case: with smart mode and an instruction that spells out the rules, users can say "comma" or "new paragraph" and get the formatting instead of the word. Results depend on the instruction, so test yours on real audio.

For the stage-by-stage version, including what cleanup can't fix, read how dictation cleanup works. The transcript rewriting docs cover writing a good instruction and choosing a rewrite mode.

Push-to-talk dictation

Push-to-talk is the dictation UX most people picture: hold a key, talk, let go, and the text is already in the field. The timing is where it's won or lost.

On key-down, start capture and call /warm. Then open the upload-while-recording request and stream audio as it arrives. On key-up, end the upload. Since the audio has been flowing the whole time, the user only waits for the last stretch plus the rewrite. That path takes up to 120 seconds of WAV or raw PCM, so convert the browser's WebM/Opus on the client. If you'd rather send a finished clip to /v1/transcribe, it can stay WebM.

Handle accidental taps too. A user who taps the key instead of holding it produces a clip a few dozen milliseconds long. The Sync API rejects anything under 80 ms, and on either API it's a wasted round trip, so drop very short clips on the client.

For the full build, see how to build push-to-talk dictation. For a working reference, Blurt does exactly this on macOS 14 and later: hold the right ⌘ key, talk, and finished text lands in whatever app has focus. It's MIT-licensed, so you can read the capture and hotkey code before writing your own.

Dictating to coding agents

Developers increasingly talk to Claude Code, Cursor, and Copilot instead of typing at them. A spoken prompt to a coding agent is a dictation problem with a twist: most of the hard words aren't English. Package names, file paths, function names, and flags are exactly what a general model mishears.

Three settings do most of the work. Pass a repo-specific keyterms_prompt with the names that actually appear in the codebase. Set an stt_prompt that describes the situation, such as "A developer describing changes to a TypeScript codebase." Then use an llm_instruction that keeps code identifiers exactly as spoken while cleaning up the rest. A rewrite that "corrects" useEffect into two words has made the prompt worse.

Use the Dictation API when the spoken prompt goes straight to the agent, so it arrives the way typed input would, punctuation and all. We cover hotkeys, editor setups, and the vocabulary work in dictating to coding agents.

What about the browser's built-in option?

Before evaluating any API, most developers try the free thing first, and they should. The Web Speech API is built into the browser, costs nothing, and gets you a working demo in an afternoon. MDN's Web Speech API reference covers the interfaces.

It stops being enough for reasons that are predictable rather than mysterious. Browser support and behavior vary by vendor, so the same code produces different results across Chrome, Safari, and Firefox. Recognition quality on proper nouns and accented speech is materially behind a current dedicated model. There's no server-side path, so anything that needs to transcribe audio your users already uploaded is out of scope. You get little control over vocabulary. And the output is verbatim, so cleanup is still on you.

If you're prototyping, use it. If dictation is going into a product where a misspelled name is a support ticket, you'll be replacing it, and it's cheaper to know that going in.

How to evaluate a dictation API

Five questions decide most evaluations:

  • Time to finished text at p50 and p95, measured on clips the length yours will be, including any cleanup step
  • Accuracy on your proper nouns: names, product terms, and identifiers from your own audio, not a general benchmark
  • Clip limits and formats: minimum and maximum duration, and whether you need a conversion step
  • Cleanup control: can you replace the default rewrite, and do you always get the verbatim transcript back
  • Pricing shape: one rate for the whole request, or speech-to-text plus language model tokens you have to forecast

The full checklist is in how to evaluate a dictation API, and the options are compared side by side in best dictation APIs. Public benchmark data is a reasonable starting filter, and ours is on the benchmarks page. But the number that matters is the one you measure on your own audio, because "dictation" in a quiet office and "dictation" in a hospital corridor are different problems.

The part that changes your product

Once dictated text exists, the interesting effects are downstream of the transcription.

Voice input has historically been a dead end in most products: a way to get text in, and nothing else. But dictated text is just text. It's searchable, quotable, linkable, and available to every feature you've already built on top of typed input. A dictated note joins your search index. A dictated command routes through the same handler as a typed one. A dictated field validates like any other field.

That reframes what you're choosing when you pick a dictation API. You're not buying a microphone feature. You're deciding how accurate the text is that everything downstream will depend on, and that decision gets harder to revisit with every feature you build on top of it. Cleanup makes the text readable. Only recognition makes it right.

If you want to see both halves working, the Dictation API launch post walks through the latency and accuracy numbers, and the playground lets you dictate into it before you write any code.

Start with the transcript being right.

Start Building Voice Input

Finished text from Universal-3.5 Pro in under a second, in 32 languages. Get a free API key and ship a dictation feature this week.

Sign up free

Frequently asked questions

What is a dictation API and how is it different from a regular speech-to-text API?

A dictation API turns a spoken clip into finished, ready-to-send text in one request, with filler removed, self-corrections resolved, and punctuation applied. A regular speech-to-text API returns a verbatim transcript of what was said, including the "um" and the restart. AssemblyAI's Dictation API returns both: the finished text in llm_response and the untouched verbatim transcript in text.

Should I use a synchronous, streaming, or async API for a dictation feature?

Use a synchronous API when text appears after the user stops talking, which is how most dictation features work. On AssemblyAI, that's the Dictation API for finished text or the Sync API for a verbatim transcript. Use the Realtime (streaming) API only if words must appear while the person is still speaking, and the Pre-recorded (async) API for long recordings where nobody is waiting.

What's the difference between the Sync API and the Dictation API?

The Sync API returns a verbatim transcript in a single request at $0.30/hr, while the Dictation API returns the finished text the speaker meant to send, plus the verbatim transcript, at $0.62/hr with cleanup included. Both run on Universal-3.5 Pro and cover 32 languages. Reach for Sync when you want the transcript itself or run your own cleanup, and Dictation when the text goes straight into what your user is writing.

How do I call a dictation API from Python?

Install the AssemblyAI Python SDK with pip install assemblyai, set your API key, and call aai.DictationTranscriber().transcribe_live("clip.wav", config) with an aai.DictationConfig. The result's text field holds the verbatim transcript and final_text holds the cleaned text, falling back to the transcript if the rewrite timed out. For a finished recording longer than the SDK's 120-second upload-while-recording limit, send a multipart POST to https://dictation.assemblyai.com/v1/transcribe with requests.

Is there a free dictation API?

The browser's built-in Web Speech API is free and fine for prototypes, but it returns verbatim text, varies across browsers, and offers limited vocabulary control. AssemblyAI gives new accounts free credits to test the Dictation API with no credit card and no sales call, and Blurt, a free open-source Mac app built on it, lets you try the output before writing code.

How long can a single dictation clip be?

On AssemblyAI's Dictation API, a finished recording sent to POST /v1/transcribe can run up to 20 minutes and 256 MB, in WAV, raw PCM, AAC, MP3, M4A, Ogg/Opus, FLAC, or WebM. Uploading while recording, through /v1/transcribe/live or the Python SDK, is capped at 120 seconds of WAV or raw PCM. The Sync API has the same limits: 20 minutes for a finished recording over HTTP, 120 seconds when uploading while recording. Recordings over 20 minutes belong on the Pre-recorded API.