Skip to main content

Introduction

AssemblyAI-STT-3.7-Realtime-Agent (assemblyai-stt-3-7-realtime-agent) is AssemblyAI’s most accurate real-time speech-to-text model for voice agents. It returns formatted transcripts, detects turns from what the speaker said rather than from silence alone, code-switches natively across 32 languages, and supports keyterm prompting, context carryover, conversation memory, and Voice Focus. The STT component is the “ears” of your voice agent. Transcription errors propagate into the LLM and response logic, so even small accuracy gaps compound in impact. Choosing and configuring the right STT model is one of the highest-leverage decisions you can make when building a voice agent. For guidance on how to evaluate and compare STT models for your use case, see the streaming evaluation guide.
Building a notetaker, live captions, or ambient transcription instead of a voice agent? Use AssemblyAI-STT-3.7-Realtime (assemblyai-stt-3-7-realtime). See Model selection.

Why AssemblyAI-STT-3.7-Realtime-Agent for voice agents?

Voice agents need speed, accuracy, and natural turn-taking. AssemblyAI-STT-3.7-Realtime-Agent is built for this: Formatted output on every message
  • Partials and finals both arrive formatted, with punctuation and casing, so there’s no separate formatting step.
  • Every final transcript is ready for immediate LLM processing.
Entity-aware turn detection
  • The model judges from the transcript whether the speaker is finished or just pausing mid-thought.
  • When a turn ends in an entity that may continue, such as part of a phone number, the turn stays open so the entity isn’t split.
  • A mode preset (min_latency, balanced, or max_accuracy) sets the turn timing. You can override min_turn_silence and max_turn_silence on the connection or mid-stream.
Fully promptable
  • Contextual prompt parameter for describing what the audio is about.
  • keyterms_prompt for boosting recognition of specific names, brands, and domain terms.
  • Update both mid-session via UpdateConfiguration to adapt the model to each stage of the conversation.
Native multilingual support
  • Supports 32 languages.
  • Automatic code-switching between languages within a single session.

What languages does AssemblyAI-STT-3.7-Realtime-Agent support?

AssemblyAI-STT-3.7-Realtime-Agent supports 32 languages with native code-switching. See Supported languages for the full list. Speakers can switch between supported languages mid-conversation without any configuration changes. If you know the expected language, pass it in language_codes. If the transcript still slips into a closely related language, also name the language in the prompt. Compare on your own audio, since for some languages the code alone works better (see Specifying the language). To bias the model toward specific languages, pass the language_codes connection parameter. See Language selection. For multilingual conversations, no configuration is needed because code-switching is native.

How do I get started?

Complete voice agent stack

For a cascading architecture, AssemblyAI has the best speech-to-text model. For a complete stack, you need:
  1. Speech-to-Text (STT): AssemblyAI-STT-3.7-Realtime-Agent
  2. Large Language Model (LLM): OpenAI, Anthropic, Google, etc.
  3. Text-to-Speech (TTS): Rime, Cartesia, ElevenLabs, etc.
  4. Orchestration: LiveKit, Pipecat, or custom build

Pre-built integrations

LiveKit Agents (recommended) LiveKit provides the fastest path to a working voice agent with AssemblyAI. See AssemblyAI-STT-3.7-Realtime-Agent on LiveKit for a full guide.
Pipecat by Daily Pipecat is an open-source framework for conversational AI with maximum customizability. See AssemblyAI-STT-3.7-Realtime-Agent on Pipecat for a full guide.

Direct WebSocket connection

For custom builds, connect directly to the WebSocket API. See the AssemblyAI-STT-3.7-Realtime-Agent API guide for a full example with interruption handling.

How does turn detection work?

AssemblyAI-STT-3.7-Realtime-Agent doesn’t end turns on silence alone. When the speaker pauses, the model evaluates what has been said so far to judge whether the speaker is finished or just pausing mid-thought. Two silence thresholds control this: The mode connection parameter sets both defaults: How it works:
  1. User speaks → audio streams to AssemblyAI
  2. User pauses for min_turn_silence → model checks whether the turn reads as complete
  3. If the turn is complete → turn ends immediately with end_of_turn: true
  4. If the turn is incomplete, or ends in an entity that may still continue → partial emitted with end_of_turn: false, turn stays open
  5. If silence reaches max_turn_silence → turn forced to end regardless of content
When speaker_labels is enabled, the server uses diarization-tuned defaults instead (min_turn_silence: 640, max_turn_silence: 768).
This is different from the legacy Universal-Streaming models, which used a confidence-based end_of_turn_confidence_threshold. AssemblyAI-STT-3.7-Realtime-Agent doesn’t use that parameter.

Setting the mode

See Optimizing accuracy and latency for more on each mode.

Entity-aware endpointing

Phone numbers, account IDs, email addresses, and spelled-out names are read out in chunks with real pauses in between. AssemblyAI-STT-3.7-Realtime-Agent keeps them in one turn with entity-aware endpointing. When the end-of-turn check runs and the transcript ends like an entity that may still continue, the turn is held open. If the speaker continues, the new speech stays in the same turn. If they don’t, the turn ends once the silence reaches max_turn_silence. Entity-aware endpointing is on in every mode and needs no parameters. Because a held turn ends at max_turn_silence, the mode also sets how long the session waits for the rest of an entity: 640 ms in min_latency, 1280 ms in balanced, and 2560 ms in max_accuracy. When your agent knows an entity is coming (for example, it just asked for a callback number), you can raise min_turn_silence or max_turn_silence for that stage using dynamic configuration updates, then set your mode again to restore its defaults. See Capturing entities like phone numbers.

Bring your own turn detection

If you run your own VAD or turn detection model, send ForceEndpoint to end a turn immediately. To give your client full control of when turns end, connect with mode set to manual. See Manual mode.

How do I handle barge-in and interruptions?

SpeechStarted events

AssemblyAI-STT-3.7-Realtime-Agent sends a SpeechStarted message once per turn, immediately before the turn’s first Turn message. SpeechStarted is only emitted once the model produces a transcript, so background noise alone doesn’t trigger it. This makes it a reliable signal for barge-in handling:
When you receive a SpeechStarted event:
  1. Stop TTS playback immediately
  2. Switch the agent back to listening mode
  3. Wait for the user’s full turn to complete before responding

Filtering backchannels

Users often produce short backchannel utterances (“mhm”, “yeah”, “um”, “okay”) while the agent is speaking. Treating every SpeechStarted event as a barge-in causes the agent to stop mid-sentence on these fillers, even though the user didn’t intend to interrupt. The fix is to gate barge-in on each Turn event during agent speech: suppress the interrupt when the transcript is short or every token is a known backchannel. Implementation depends on your stack:
  • LiveKit: LiveKit Cloud users should enable adaptive interruption handling. Self-hosted deployments use the two custom filters in the same section.
  • Direct WebSocket: see Interruption handling on the AssemblyAI-STT-3.7-Realtime-Agent API page for the combined word-count + filler-word filter.

Tuning interruption sensitivity

Two parameters control how eagerly SpeechStarted and early partials fire: If quiet or distant speech is being missed, lower vad_threshold. If background noise or the agent’s own TTS audio is triggering false interruptions, raise vad_threshold, increase interruption_delay, or enable Voice Focus.

VAD threshold alignment

If you’re also running a local VAD (common in LiveKit and Pipecat), align its threshold with AssemblyAI’s vad_threshold (default 0.2) to avoid a dead zone where one detects speech but the other doesn’t:
If you’re in a noisy environment and getting false speech triggers, raise both thresholds together.

How can I use prompting to improve accuracy?

The prompt parameter

AssemblyAI-STT-3.7-Realtime-Agent supports a prompt parameter for contextual prompting, a natural-language description of what the audio is about. Transcription behavior itself (verbatim output, punctuation, turn detection) is built in and managed automatically. The prompt carries context, not instructions.
Start without a prompt to establish baseline performance, then add context to optimize for your use case.
Tips for effective prompts:
  • Describe the conversation: domain, scenario, or full details. Start broad, and add only details your application actually knows (see the three context levels).
  • Include names and identifiers you already know: caller name, account or order IDs, products. Detailed context helps the model spell them correctly.
  • Specify language: use the language_codes connection parameter for monolingual sessions (Language selection).

Keyterms prompting

Use keyterms_prompt to boost recognition of specific names, brands, or domain terms, up to 100 terms per session:
Best practices for keyterms:
  • Include proper names, product names, technical terms, and domain-specific jargon
  • Include terms up to 50 characters each
  • Don’t include common English words, single letters, or generic phrases
  • Don’t exceed 100 terms total
For detailed guidance, see Keyterms prompting.

How do I update configuration mid-session?

You can update prompt, keyterms_prompt, mode, min_turn_silence, max_turn_silence, vad_threshold, and interruption_delay during an active session using UpdateConfiguration. This is one of the most powerful features for voice agents. See Updating configuration mid-stream for the full list.

Dynamic keyterms by conversation stage

As your voice agent moves through different stages, update keyterms to match what the user is likely to say:

Dynamic prompting

You can also update the transcription prompt mid-session. This is especially powerful when paired with tool calls in your LLM:
  • If your agent asks a yes/no question, prompt the model to anticipate short responses
  • If your agent asks for a phone number or email, prompt it to expect those formats
  • If you present a list of options, boost those options in the prompt

How do I use speaker diarization?

Streaming Diarization identifies and labels individual speakers in real time. Each Turn event includes a speaker_label field (e.g., "A", "B") indicating which speaker produced that transcript. Enable it by adding speaker_labels: true to your connection parameters:
Speaker accuracy improves over the course of a session as the model accumulates embedding context. Enabling speaker_labels also switches turn detection to diarization-tuned defaults (min_turn_silence: 640, max_turn_silence: 768). With LiveKit:
With Pipecat (including custom formatting):
For more details, see Streaming Diarization and Multichannel.

How do I optimize for latency?

Key optimizations

1. Choose the right mode Start with mode="balanced". Switch to min_latency for faster turn ends, and raise min_turn_silence or max_turn_silence only if you’re seeing turns end too early. 2. Keep interruption_delay low for faster TTFT The interruption_delay parameter controls how soon the first partial is emitted. It defaults to 0 on AssemblyAI-STT-3.7-Realtime-Agent, which gives the fastest possible time to first token. Raise it only if background noise triggers false interruptions. See Tuning interruption sensitivity. 3. Eliminate additive delays in your orchestrator In LiveKit with turn_detection="stt", set endpointing={"min_delay": 0} inside TurnHandlingOptions. LiveKit’s default 0.5s delay is additive on top of AssemblyAI’s own endpointing. 4. Use 16kHz sample rate This balances audio quality and bandwidth. Higher sample rates don’t improve accuracy. 5. Align VAD thresholds Mismatched VAD thresholds between your local VAD and AssemblyAI create a dead zone that delays interruption. Set both to 0.2. 6. Skip unnecessary features Only enable speaker_labels if you need diarization. Only use keyterms_prompt if you have domain-specific terms. Each feature adds marginal processing overhead.

Turn timing by mode

A turn that reads as complete ends at min_turn_silence. A turn that reads as incomplete, or ends in an entity that may still continue, ends at max_turn_silence if the speaker doesn’t continue.

How does the message sequence work?

AssemblyAI-STT-3.7-Realtime-Agent sends messages in a specific sequence. Here’s what a typical conversation looks like: 1. Session begins
2. Speech detected
3. Early partial (emitted shortly after speech begins, timed by interruption_delay)
4. Pause partial (speaker pauses, and the turn reads as incomplete or ends in an entity that may continue)
5. Final transcript (the turn reads as complete, or max_turn_silence is reached)
Each Turn message re-transcribes the full turn, so it supersedes the previous one. Replace what you have rendered rather than appending. Partials are formatted, but their text can change until the final. Use end_of_turn: true to detect the final transcript.
6. Session termination
For the complete message reference, see Message sequence.

How can I improve accuracy?

Keyterms prompting

The single most effective way to improve accuracy on domain-specific terms. Keyterms are especially useful for improving recognition of proper nouns, product names, and technical jargon spoken with accents or in noisy environments. See How can I use prompting to improve accuracy? above.

Dynamic configuration updates

Update keyterms and prompts mid-session based on conversation context. See How do I update configuration mid-session? above.

Tune silence thresholds

Entity-aware endpointing keeps most entities in one turn without configuration. If turns still end too early, raise min_turn_silence (when pauses end a turn that reads as complete) or max_turn_silence (when speakers pause longer than the forced turn end). You can do this mid-session for specific conversation stages like entity dictation.

Noise handling

Avoid adding client-side noise cancellation as a preprocessing step. The artifacts it introduces typically cause more harm than the background noise itself. To suppress background audio, enable Voice Focus, which isolates the primary speaker server-side before audio reaches the model.

Scaling and rate limits

AssemblyAI’s Real-time STT API provides unlimited parallel streams:
  • No hard caps on simultaneous connections
  • No overage fees for spike traffic
  • Automatic scaling from 5 to 50,000+ streams
Rate limits:
  • Free users: 5 new streams per minute
  • Pay-as-you-go: 200 new streams per minute
  • When using 80%+ of your limit, capacity automatically increases 10% every 60 seconds
These limits are designed to never interfere with legitimate applications. Your baseline limit is guaranteed and never decreases, so you can scale smoothly without artificial barriers. See Rate limits.

Evaluating your voice agent

Benchmark scores are a useful starting point, but they don’t tell the full story. To determine which STT model works best for your voice agent in production:
  • Run A/B tests at scale. Swap models in your agent pipeline, compare core outcome metrics (task completion rate, booking rate, resolution rate), and let real user behavior determine the winner.
  • Optimize for outcomes, not benchmarks. The question is not which model has the best WER. It is which model drives users to complete their goal most reliably.
  • Simulate real scenarios early. Before you have real users, manually test the full agent flow under realistic conditions. This surfaces issues that isolated STT benchmarks will miss.
For a complete evaluation framework including accuracy metrics, latency metrics, and ground truth best practices, see the streaming evaluation guide.

Additional resources