Skip to main content

Overview

This guide covers integrating AssemblyAI’s AssemblyAI-STT-3.7-Realtime-Agent speech-to-text model into a LiveKit voice agent using the Agents framework. LiveKit Agents is an open-source framework for building real-time voice, video, and multimodal AI agents. Your agent joins a LiveKit room as a participant and exchanges audio with users over WebRTC or SIP telephony. An AgentSession wires together speech-to-text, LLM, and text-to-speech plugins and handles the orchestration, including turn detection and interruptions.
AssemblyAI-STT-3.7-Realtime-Agent is our most accurate streaming model for voice agents — multilingual and promptable, with conversation context and voice focus.It’s the AssemblyAI plugin’s default model as of livekit-agents 1.9.0. On 1.8.12 or 1.8.13, set model="assemblyai-stt-3-7-realtime-agent" explicitly, since those versions default to universal-3-6-pro.
AssemblyAI provides the speech-to-text in your LiveKit pipeline, and can also decide when each turn ends (see Turn detection): Once you have an agent running, tune it for what matters most to your use case:

Turn detection

Decide when the user is done speaking — modes, defaults, and entity tuning.

Latency

Shorten the gap between the user finishing and the agent replying.

Accuracy

Prompting, key terms, conversation context, and noise handling.

Interruptions

Natural barge-in without false triggers from backchannels.

Quickstart

Get a working, talking agent in a few minutes, then optimize from there.
1

Install the SDK

Install the plugin and supporting packages (silero, codecs, dotenv) from PyPI:
LiveKit’s turn detector is built into livekit-agents, so external turn detection needs no extra package.
Install the latest livekit-agents from PyPI. assemblyai-stt-3-7-realtime-agent requires 1.8.12+, and mode="manual" for external turn detection requires 1.9.0+.
2

Set your API keys

Set your API keys in a .env file:
You can obtain an AssemblyAI API key by signing up for a free account and navigating to the API Keys tab of the dashboard.
3

Build a minimal agent

The following example uses turn_detection="stt" (recommended). The comments show how to switch to external turn detection with LiveKit’s turn detector.
For a complete voice agent, you will also need to install LLM and TTS plugins for your chosen providers. See the LiveKit plugins documentation for available options.
4

Run and test

Start your agent in development mode:
Then test it in the LiveKit Playground:
  1. Go to agents-playground.livekit.io
  2. Connect to your LiveKit Cloud project (same credentials as your .env)
  3. Click Connect: a room will be created, your agent will join, and you can start talking

Parameters reference

AssemblyAI-STT-3.7-Realtime-Agent parameters

These are the key parameters to tune for LiveKit when using AssemblyAI-STT-3.7-Realtime-Agent:
string
default:"assemblyai-stt-3-7-realtime-agent"
The streaming model. "assemblyai-stt-3-7-realtime-agent" is our recommended model for voice agents and the plugin’s default as of livekit-agents 1.9.0. On 1.8.12 or 1.8.13, the plugin defaults to "universal-3-6-pro", so pass model explicitly there.
string
Accuracy/latency preset: "min_latency", "balanced", or "max_accuracy". Sets the defaults for min_turn_silence and max_turn_silence; any value you set explicitly still takes precedence. The server default is "balanced". When mode is set, the plugin leaves min_turn_silence and max_turn_silence unset so the preset’s values apply. Connect-time only — cannot be changed with update_options. See Optimizing accuracy and latency.Set "manual" to let LiveKit’s turn detector, VAD, or your own logic end each turn instead of AssemblyAI. Requires livekit-agents 1.9.0+. See External turn detection.
list of strings
List of terms to boost recognition for. Applied automatically alongside any contextual prompt.
string
Contextual prompt — a natural-language description of what the audio is about (domain, scenario, or full details). Transcription behavior is built in and optimized automatically.
string
Your agent’s most recent spoken reply, up to 1750 characters, used as context for transcribing the next user turn. The 1750-character cap is enforced client-side — explicit values over the cap raise ValueError (both at construction and via update_options); only automatic forwarding truncates silently. Can be set at construction time and updated mid-stream with update_options. See Conversation context.
string | list[string]
Steer transcription toward one or more expected languages instead of auto-detecting across all supported languages. Accepts a single code ("es") or a list (["en", "es"]); entries are normalized to ISO 639-1 ("en-US", "english" → "en"). Up to 10 codes. Leave unset for the default multilingual behavior. Can be updated mid-session via update_options; pass an empty list to clear steering.
integer
How many prior conversation entries are carried forward automatically. Range 0–100; 0 disables carryover. Leave unset for the server default (5). Connect-time only — cannot be changed with update_options.
integer
default:"100"
Milliseconds of silence before AssemblyAI checks for end-of-turn. The plugin sends 100 when mode is unset; set mode to use the preset’s value instead. With mode="manual", it no longer ends turns, so leave it unset.
integer
default:"100"
Maximum milliseconds of silence before the turn is forced to end. When mode is unset, the LiveKit plugin defaults to 100 (matching min_turn_silence). When using turn_detection="stt", set mode="balanced" (which applies 1280) or set max_turn_silence=1280 explicitly. With mode="manual", it defaults to 10000 and only ends a turn if LiveKit never does.
float
default:"0.2"
AssemblyAI’s internal VAD onset threshold. Defaults to 0.2 in every mode. Set LiveKit’s Silero activation_threshold to the same value for consistent behavior.
string
Server-side noise suppression that isolates the primary speaker. "near-field" for close-talking mics, "far-field" for distant capture. Connect-time only. See Voice focus.
float
How aggressively voice_focus suppresses background audio. 0.0–1.0; higher is more aggressive. Connect-time only.
integer
default:"0"
How soon the first partial transcript is emitted during a turn, in milliseconds. Range: 0–1000. Lower values produce faster time to first token (TTFT) for barge-in and speculative inference; higher values produce more confident first partials. Defaults to 0 in every mode. The server adds a fixed 256 ms on top of the configured value (interruption_delay: 0 → ~256 ms effective, interruption_delay: 500 → ~756 ms effective). See Tuning early partial timing for details.
boolean
default:"true"
AssemblyAI-STT-3.7-Realtime-Agent code-switches natively between supported languages. This parameter controls whether language_code and language_confidence are included in turn messages. Defaults to true in the LiveKit plugin, but false when using the API directly.

General STT parameters

These parameters apply to all AssemblyAI streaming models and can remain the same between models:
int
default:"16000"
The sample rate of the audio stream.
str
default:"pcm_s16le"
The encoding of the audio stream. Allowed values: pcm_s16le, pcm_mulaw.

Legacy parameters

These parameters apply to the universal-streaming-english and universal-streaming-multilingual AssemblyAI streaming models, but do not affect AssemblyAI-STT-3.7-Realtime-Agent:
float
default:"0.4"
Confidence threshold for end-of-turn detection. AssemblyAI-STT-3.7-Realtime-Agent uses min_turn_silence and max_turn_silence instead.
boolean
default:"false"
Whether to return formatted final transcripts. AssemblyAI-STT-3.7-Realtime-Agent always returns formatted transcripts, so this parameter no longer applies.

Turn detection

In LiveKit, how your agent detects the end of a user’s turn is controlled by the turn_detection parameter inside TurnHandlingOptions, which is passed to AgentSession via the turn_handling argument. AssemblyAI-STT-3.7-Realtime-Agent supports two ways of deciding when the user is done:

Built-in turn detection

With turn_detection="stt", AssemblyAI’s built-in turn detection determines when the user has finished speaking. AssemblyAI’s end_of_turn signals are then used directly by LiveKit to commit the turn. When the user pauses, AssemblyAI-STT-3.7-Realtime-Agent checks for end-of-turn. The min_turn_silence and max_turn_silence parameters you pass to AssemblyAI control when that check runs and how long a turn can stay open. For more details, see How turn detection works. In this mode, we recommend explicitly setting mode="balanced" or min_turn_silence=128 and max_turn_silence=1280. When mode is unset, the LiveKit plugin defaults to min_turn_silence=100 and max_turn_silence=100, which might be too aggressive for built-in turn detection. See Default parameter differences. Recommended starting parameters (set on assemblyai.STT(), not on AgentSession): How it works:
  1. User speaks → audio streams to AssemblyAI
  2. User pauses for 128ms (or min_turn_silence) → AssemblyAI checks for end-of-turn
  3. If the user is done → turn ends immediately
  4. If not → partial emitted, turn stays open
  5. If silence reaches 1280ms (or max_turn_silence) → turn is forced to end
Endpointing min_delay is additive in STT modeLiveKit’s endpointing min_delay (default 0.5 seconds) is applied on top of AssemblyAI’s own endpointing. In STT mode, this delay starts after the STT end-of-speech signal, meaning it adds up to 500ms of extra latency by default.Set endpointing={"min_delay": 0} inside TurnHandlingOptions to avoid this. AssemblyAI’s own endpointing parameters (min_turn_silence and max_turn_silence) already control the timing, so an additional delay on the LiveKit side is unnecessary latency. See Latency for the full picture.

Default parameter differences

When not explicitly provided, the default endpointing parameters for AssemblyAI-STT-3.7-Realtime-Agent differ on LiveKit versus using AssemblyAI’s API directly:
  • LiveKit AssemblyAI plugin defaults (when mode is unset):
    • min_turn_silence=100
    • max_turn_silence=100
  • AssemblyAI API defaults (the balanced mode):
    • min_turn_silence=128
    • max_turn_silence=1280
Setting mode on the plugin applies that mode’s values instead of the 100 ms defaults.However, you can always override these by passing your own preferred values explicitly. Misconfiguring these parameters is the most common cause of poor performance.
AssemblyAI-STT-3.7-Realtime-Agent’s endpointing is controlled by two AssemblyAI API parameters, min_turn_silence and max_turn_silence, that you pass to the STT plugin. These are separate from LiveKit’s endpointing.min_delay and endpointing.max_delay (set inside TurnHandlingOptions). With mode unset, the plugin finalizes transcripts after 100ms of silence.
  • With a third-party turn detector: for best performance, use external turn detection with mode="manual".
  • With built-in turn detection: for best performance, set mode (for example, mode="balanced"), or set min_turn_silence and max_turn_silence yourself.
Tuning endpointing parametersThese are the default values used when no parameters are explicitly provided. You will likely need to experiment with different values depending on your use case:
  • Increase min_turn_silence: when brief pauses end turns before the user has finished speaking.
  • Increase max_turn_silence: when the forced turn end is cutting off users mid-thought or splitting entities like phone numbers across turns, a higher value lets the model wait longer before forcing the turn to end when the model is unsure.
See the Entity splitting tradeoff section for examples.

Entity splitting tradeoff

Lower min_turn_silence and max_turn_silence values produce faster transcripts but can split entities or utterances across turns. The two parameters affect this differently. When the user pauses partway through an entity, like a phone number or email address, AssemblyAI holds the turn open until silence reaches max_turn_silence (entity-aware endpointing). That makes max_turn_silence the main setting for keeping entities in one turn. min_turn_silence too low
  • AssemblyAI checks for end-of-turn on very brief pauses, so a turn can end before the user has finished speaking.
max_turn_silence too low
  • Forced turn-end cuts off user mid-thought or mid-entity.
  • Example: User spells out an email address with pauses between parts. With the plugin’s 100 ms default, each pause forces the turn to end.
  • Example: User pauses longer than 1 second to think mid-sentence. The forced end fires at 1000ms, splitting the utterance into two turns.
AssemblyAI-STT-3.7-Realtime-Agent’s formatting is significantly better when it has full context in a single turn. Email addresses, phone numbers, credit card numbers, and physical addresses all benefit from this.
LLMs downstream can usually piece together split entities, but if your use case involves alphanumeric dictation or entity extraction, consider increasing min_turn_silence and max_turn_silence during those portions of the conversation. You can update configuration mid-stream to raise max_turn_silence temporarily (e.g., to 2000–4000 ms) when expecting entity input, then lower it again afterward.

External turn detection

To have LiveKit’s turn detector, VAD, or your own logic decide when each turn ends, set mode="manual" on assemblyai.STT. This turns off AssemblyAI’s own turn detection. When LiveKit ends the user’s turn, the plugin sends any buffered audio and then a ForceEndpoint, and AssemblyAI returns that turn’s final transcript right away. Every ForceEndpoint gets exactly one final (with an empty transcript if nothing was said), so LiveKit never waits on a final that isn’t coming.
Manual mode requires livekit-agents 1.9.0+ and model="assemblyai-stt-3-7-realtime-agent". It doesn’t support speaker_labels yet, and the plugin raises a ValueError for that combination.

LiveKit turn detector (v1 and v1-mini)

LiveKit’s turn detector is a multimodal model that predicts the end of a turn from the user’s audio and the agent’s last message. It comes in two versions: v1, served on LiveKit Inference, and v1-mini, which runs locally on CPU. It’s the default turn detection in AgentSession, and LiveKit picks the version for your environment.
Using LiveKit Inference? Construct inference.STT with external_endpointing=True and pass mode in extra_kwargs. Without external_endpointing, LiveKit’s flushes don’t end AssemblyAI’s turn. A model string passed to stt can’t set it. Requires livekit-agents 1.9.0+.
Pass your VAD to AgentSession only. A vad on inference.STT ends each turn at VAD end of speech, ignoring LiveKit’s turn detector.
How it works:
  1. User speaks → AssemblyAI sends partials while they speak and on every pause
  2. VAD detects the end of speech → LiveKit’s turn detector predicts whether the user is done
  3. If the user is likely done → LiveKit flushes the stream, the plugin sends ForceEndpoint, and AssemblyAI returns the final right away. LiveKit commits the turn once endpointing.min_delay has passed since the user stopped speaking.
  4. If the user is likely to continue → LiveKit waits up to endpointing.max_delay for more speech. Halfway through, it flushes anyway so a final is ready. If the user keeps talking, the next final is added to the same user turn.
Keep LiveKit’s endpointing defaults for the turn detector (min_delay=0.3, max_delay=2.5). Because of the flush halfway through max_delay, a pause longer than about 1.25s ends AssemblyAI’s turn even when the user isn’t done. For steps where users pause longer, like reading out a card number, raise endpointing.max_delay on the agent that handles that step. Parameter behavior:
  • min_turn_silence: no longer ends turns, so leave it unset.
  • max_turn_silence: only ends a turn if LiveKit never does. Defaults to 10000 (ms) in manual mode.
For the full turn lifecycle in manual mode, see Manual mode.

Other turn detection models

Manual mode works with any model that ends LiveKit’s turn, whether it works from audio or text:
  • Your own model: set turn_detection="manual" and call session.commit_user_turn() when your model decides the user is done. Each commit ends the AssemblyAI turn and returns its final. In LiveKit’s manual turn control, interruptions are also yours to handle, with session.interrupt().
  • LiveKit’s text turn detector (MultilingualModel()): works, though LiveKit has deprecated it in favor of the multimodal turn detector above. It predicts from final transcripts, so LiveKit flushes at every VAD end of speech before predicting, and AssemblyAI’s turns end at each pause.

Other setups

Don’t combine mode="manual" with turn_detection="stt". Nothing ends the turn in that setup, so each turn only ends after max_turn_silence (10s). To let AssemblyAI decide when turns end, use built-in turn detection instead.

VAD configuration

With turn_detection="stt", AssemblyAI also sends SpeechStarted events that LiveKit uses for barge-in/interruption handling. SpeechStarted is only emitted when the model produces a transcript. Silero VAD is not strictly required in this mode, but it is still recommended as Silero runs locally and it can be faster than waiting for AssemblyAI’s SpeechStarted signal. LiveKit respects whichever signal arrives first, so Silero provides faster interruption while AssemblyAI’s signal serves as a reliable backup. With external turn detection, VAD is required: LiveKit runs the turn detector when VAD detects the end of speech, and uses VAD for interruptions. AgentSession provides a VAD automatically if you don’t pass one, but passing Silero lets you align its threshold with AssemblyAI’s.

Threshold alignment

LiveKit’s Silero VAD defaults to an activation_threshold of 0.5. AssemblyAI’s vad_threshold defaults to 0.2. For best performance, set Silero’s activation_threshold to 0.2 to match. Both should be adjusted together to the same value to ensure accurate transcription and consistent barge-in thresholds. When the thresholds are mismatched, you get a dead zone: if Silero is at 0.5 and AssemblyAI is at 0.2, AssemblyAI will be actively transcribing speech that LiveKit hasn’t detected yet, delaying interruption. Keeping them aligned eliminates this.
If you’re in a noisy environment and receiving false speech triggers, raise both stt.vad_threshold and vad.activation_threshold thresholds together.

Latency

A voice agent feels responsive when the gap between the user finishing and the agent replying is short. Start with the mode preset — the highest-level dial for the accuracy/latency trade-off. It sets sensible defaults for the fine-grained levers below, so you can pick a target and tune from there:
mode is set at construction time (it can’t be changed mid-session) and sets the defaults of min_turn_silence and max_turn_silence. Any value you set explicitly still wins. The server default is balanced. See Optimizing accuracy and latency. From there, fine-tune the individual levers:
  • Endpointing delay (STT mode). LiveKit’s endpointing.min_delay is applied on top of AssemblyAI’s own end-of-turn timing and adds up to 500ms by default. Set endpointing={"min_delay": 0} when using turn_detection="stt" — see Built-in turn detection.
  • End-of-turn timing. min_turn_silence (end-of-turn check) and max_turn_silence (forced end) directly control how soon a turn ends. Lower is faster but risks splitting entities — see Turn detection.
  • Time to first partial. interruption_delay controls how soon the first partial is emitted, which drives faster barge-in and speculative inference. The server adds a fixed 256ms on top of the configured value.
  • Sample rate. Use 16 kHz (sample_rate=16000). Higher rates don’t improve accuracy and only add bandwidth.
  • Skip client-side preprocessing. Don’t run your own noise cancellation before audio reaches the model — the artifacts it introduces usually hurt accuracy more than the original noise. Use server-side Voice Focus instead.

Latency breakdown

Accuracy

AssemblyAI-STT-3.7-Realtime-Agent is accurate out of the box. When you need more — domain vocabulary, proper nouns, noisy audio — reach for these levers. For entity-heavy dictation, also tune turn detection (see Entity splitting tradeoff), and note that the high-level mode preset shifts the overall accuracy/latency balance (use max_accuracy to favor quality).

Prompting

AssemblyAI-STT-3.7-Realtime-Agent supports a prompt parameter for contextual prompting — a description of what the audio is about. Transcription behavior (verbatim output, punctuation, turn detection) is built in and optimized automatically; the prompt carries context, not instructions.
Tips:
  • Start with no prompt: AssemblyAI-STT-3.7-Realtime-Agent delivers strong accuracy out of the box — only add context if domain-specific vocabulary is being misrecognized.
  • Describe the conversation: domain, scenario, or full details — start broad, and add only details your application actually knows (see the three context levels).
  • Include known names and identifiers: caller name, account or order IDs, products — detailed context helps the model spell them correctly.

Key terms

Instead of prompt, use keyterms_prompt to boost recognition of specific names, brands, or domain terms:

Language selection

By default, AssemblyAI-STT-3.7-Realtime-Agent auto-detects and code-switches across all supported languages. If you know which languages a caller will speak, language_codes steers transcription toward them for better accuracy on short or ambiguous turns. It can also be updated mid-session (e.g. when a caller switches languages) via update_options. Requires livekit-agents 1.6.6+.

Conversation context

Give the model both sides of the dialog so it transcribes the next user turn more accurately. AssemblyAI-STT-3.7-Realtime-Agent keeps a short, per-session memory of the conversation from two sources:
  • The agent half — what your agent just said, forwarded automatically into agent_context by AgentSession on livekit-agents 1.6.6+ (no wiring needed).
  • The user half — prior STT-finalized user turns, carried forward automatically (no configuration needed).
With the agent’s question in context, the model can anticipate the answer, sharpen entity recognition, and disambiguate similar-sounding words. For example, after your agent asks "What's your email address?", agent_context lets the model produce "user@assemblyai.com" instead of "user at assemblyai dot com". This has the biggest impact on short replies ("yes", "7pm", single names) and spelled-out entities. See Conversation context for the full reference.
agent_context and previous_context_n_turns aren’t supported on the legacy Universal-Streaming models. previous_context_n_turns is set at construction time and cannot be changed with update_options().

Automatic on 1.6.6+

On livekit-agents 1.6.6+, AgentSession forwards each assistant reply into agent_context automatically — no wiring needed. Replies longer than the 1750-character limit are truncated automatically, keeping the tail (the end of the reply — usually the question — has the most biasing value). To opt out, use the session-level toggle:
While automatic forwarding is on, any agent_context you set manually is replaced by the next assistant reply. To manage agent_context yourself (e.g. custom trimming or filtering), set forward_chat_context: False and push it via update_options(agent_context=...) after each reply.
To seed the model with your agent’s opening greeting, pass agent_context on assemblyai.STT(...) at construction time — automatic forwarding takes over from the first reply onward.
If you’re on a version of livekit-agents that predates 1.6.6, or you want to manage agent_context yourself, wire it via the conversation_item_added event. LiveKit emits it for every conversation item; filter for the assistant’s messages and forward the (trimmed) text to the STT plugin via update_options(agent_context=...). No reconnect is required.A complete runnable example is on GitHub: including-agent-context.

LiveKit Inference

LiveKit Inference also serves AssemblyAI-STT-3.7-Realtime-Agent: pass stt="assemblyai/assemblyai-stt-3-7-realtime-agent" to AgentSession instead of the plugin, and use your LiveKit Cloud credentials rather than an AssemblyAI API key. As of livekit-agents 1.8.13, the SDK forwards the agent’s replies into agent_context automatically for the 3.7 model. language_codes is plugin-only for now. For external turn detection on Inference, see External turn detection.

Voice focus

Voice Focus isolates the primary speaker and suppresses background noise — chatter, keyboard clicks, fan hum, room echo — server-side, before audio reaches the model. Use it instead of client-side noise cancellation, which tends to introduce artifacts that hurt accuracy more than the noise itself. Both are connection-time parameters and cannot be changed with update_options(). See Voice Focus for details.

Interruption handling

In voice agent conversations, users often produce backchannel utterances (“mhm”, “yeah”, “um”, “okay”) while the agent is speaking. These short fillers can trigger LiveKit’s interruption logic, causing the agent to stop mid-sentence even though the user didn’t intend to interrupt. LiveKit Cloud users should reach for adaptive interruption handling first. Self-hosted deployments can combine the two custom filters described below. LiveKit Agents v1.5.0 introduced adaptive interruption handling, a server-side model that classifies overlapping speech as a real interrupt or a backchannel. On a false interrupt the agent’s TTS resumes from where it left off. No re-generation is needed. The feature is recommended for LiveKit Cloud users and is included on all Cloud plans.
See LiveKit’s adaptive interruption handling docs for full requirements and behavior.

Self-hosted alternative

If you’re self-hosting LiveKit, can’t use adaptive interruption handling, or need explicit control over which utterances count as filler, the two complementary filters below provide strong guardrails for interruption and barge-in handling. They have non-overlapping failure modes: the backchannel filter stops known fillers before they enter the pipeline, while the buffer-clearing filter catches any short utterance (including unknown fillers or stutters) that slips past. Running both provides the strongest coverage. A working reference implementation is available on GitHub.
The backchannel filter intercepts STT events at the stt_node level, before they reach LiveKit’s audio_recognition. It checks each transcript event for known disfluencies and backchannels (“um”, “mhm”, “yeah”, “okay”, etc.) and drops the event entirely. Because the event never enters the pipeline, none of the downstream orchestration (interrupt gates, end-of-turn detection, and preemptive LLM generation) ever reacts to it.The filter is implemented as a mixin class that wraps Agent.stt_node:
How it works:
  1. While the agent is speaking (plus a 1-second grace window after speech ends), the filter inspects each STT transcript event
  2. It strips punctuation and checks whether every token in the transcript matches the BACKCHANNELS set
  3. Pure-filler transcripts like “mhm” or “yeah okay” are dropped. They never reach LiveKit’s pipeline
  4. Utterances with any non-filler token (e.g., “yeah I want the suite”) always pass through
The BACKCHANNELS set is domain-customizable. “yes” and “no” are deliberately excluded because they often represent genuine confirmations in booking or IVR scenarios. Edit the set for your use case.
LiveKit accumulates committed FINAL transcripts in a private buffer (_audio_transcript) across the user’s uncommitted turn. The _interrupt_by_audio_activity method checks the running word count against min_words to decide whether to pause TTS.Without intervention, two consecutive short fillers like “yeah” + “um” sum to two words and trip the interrupt gate, even though each utterance on its own is below threshold.This filter listens on the user_input_transcribed event and wipes the buffer whenever the agent is speaking and the user input falls below the configured min_words threshold. Each short utterance is evaluated independently rather than against the accumulated total.
This filter requires interruption.min_words to be set to 2 or higher. Without it, the word-count gate is disabled and the filter has no effect.
This filter accesses LiveKit private APIs (_audio_transcript, _audio_interim_transcript, _audio_preflight_transcript, _cancel_preemptive_generation). Pin your livekit-agents version to avoid breakage on minor updates. Tested with livekit-agents>=1.5.
Three changes are needed:1. Mix in the backchannel filter on your agent class. Place it before Agent in the class bases so its stt_node runs first:
2. Configure the session with interruption.min_words >= 2. This enables the word-count gate that the buffer-clearing filter depends on:
3. Install the buffer-clearing filter on the session, then start it with your agent:
Setting vad=None with turn_detection="stt" is the recommended setup for both filters. This ensures only STT-based signals drive interruption, avoiding timing races from a competing VAD interrupt path. If you need VAD for faster barge-in, both filters still work: set interruption.min_words to 2 and ensure Silero’s activation_threshold matches vad_threshold.
Expected behavior with both filters active and min_words=2:

Dynamic configuration

You can update prompt, keyterms_prompt, agent_context, language_codes, min_turn_silence, max_turn_silence, and interruption_delay during an active session using update_options — no reconnect required. This lets you adapt to the conversation stage: boost names while collecting caller details, widen silence windows while a user dictates an email, then tighten them again.
For more information, see Updating configuration mid-stream.

Troubleshooting

Migrating from another STT provider

To balance accuracy, latency, turn-taking, and interruption handling, map your current setup to AssemblyAI using the questions below. Each answer points to the settings that reproduce — and usually improve on — your current behavior.

How are you detecting end-of-turn today?

Which model and settings are you migrating from?

VAD, interruptions, and infrastructure

Parameter cheat sheet

If you’re coming from AssemblyAI’s standard streaming model: Migrating a production deployment? Talk to our team.