Voice agents are no longer demo territory. Developers are shipping them to production for customer support, sales coaching, intake calls, and anything else where a keyboard gets in the way. The hard part is wiring up the pipeline without it becoming a second full-time job.
This tutorial walks you through building a complete voice agent with LiveKit Agents as the orchestration framework. AssemblyAI handles both speech ends: AssemblyAI-STT-3.7-Realtime-Agent for speech-to-text and AssemblyAI text-to-speech (assemblyai-tts-1) for the agent's voice, both through the same LiveKit plugin. You'll wire in OpenAI GPT-4o for the LLM, run it locally first, and then connect it to the LiveKit Agents Playground.
If you've never touched LiveKit before, that's fine. We'll cover what you need to know.
What is LiveKit?
LiveKit is an open-source real-time communication platform built on top of WebRTC. It handles the hard parts of real-time audio and video (signaling, media routing, scaling) so you can focus on your application logic.
At the center of every LiveKit application is a room. Participants join rooms and publish audio or video tracks. Other participants subscribe to those tracks. A LiveKit server (self-hosted or LiveKit Cloud) acts as the Selective Forwarding Unit that routes media between participants without requiring peer-to-peer connections at scale.
LiveKit Agents is the framework layer built on top of this infrastructure for AI voice and video agents. It handles orchestration between STT, LLM and TTS services. You configure the components, and LiveKit Agents manages the flow. Your agent joins a room like any other participant, listens to audio tracks, and responds. You write agent logic, not media plumbing.
The voice agent pipeline
Voice agents follow a three-step cascading pipeline:
- Speech-to-text (STT): the user speaks. Audio streams into your STT model, which returns a transcript in real time.
- LLM: the transcript goes to a language model, which generates a response.
- Text-to-speech (TTS): the LLM's response is converted to audio and streamed back to the user.
Here's what that looks like in this stack:
WebRTC (LiveKit room)
↓
LiveKit Cloud
↓
AssemblyAI-STT-3.7-Realtime-Agent ← speech-to-text
↓ transcript + turn signal
OpenAI GPT-4o ← LLM
↓ text response
AssemblyAI-TTS-1 ← text-to-speech
↓ audio
Back to LiveKit roomThe STT layer is where most voice agents fail. If the transcript is wrong, the LLM responds to the wrong input, and it treats a misheard order number as fact. The TTS layer is the other half of what the caller hears: how fast the first word lands, and whether the order number comes out right.
Why AssemblyAI-STT-3.7-Realtime-Agent for STT?
AssemblyAI-STT-3.7-Realtime-Agent (assemblyai-stt-3-7-realtime-agent) is AssemblyAI's speech-to-text model built for voice agents. The model selection docs describe it as "the most accurate model for voice agents", with keyterm prompting, context carryover, conversation memory, Voice Focus and 32 languages with native code switching. It's $0.45/hr, billed on session duration.
The LiveKit AssemblyAI plugin accepts it from livekit-plugins-assemblyai 1.8.12. The plugin's default is still universal-3-6-pro, so you pass model="assemblyai-stt-3-7-realtime-agent" explicitly in the code below.
Accuracy on the errors that break agents
Real calls carry email addresses, phone numbers, account numbers, dollar amounts and one-word answers, and those are the turns where generic STT models slip. Against Universal-3.6 Pro Realtime, the previous model, the Realtime Agent research post reports:
- 80% fewer number errors on Voice Code Bench, a set of recordings dense in numbers and codes (11.28% to 2.27%).
- 47% fewer words added while the user is silent, so background speech leaks into far fewer turns (2.53 to 1.34 per 1,000 words).
- 38% fewer dropped short replies, the one- and two-word answers such as "yes" that come back empty (0.29% to 0.18%).
- 14% lower word error rate on AssemblyAI's English voice-agent benchmark (5.26% to 4.53%).
- 12% fewer false end-of-turn events, so fewer callers get cut off mid-thought.
That benchmark is 12,460 scripted voice-agent scenarios voiced by 522 speakers, recorded as telephony audio with no, low or heavy background noise. Of the 26 streaming models we ran (August to November 2026), Realtime Agent has the lowest normalized word error rate and the lowest entity error rate, ahead of Soniox, ElevenLabs and Deepgram, and its lead over Soniox Realtime v6 holds at every noise level:
| System | Normalized WER (all recordings) | Entity error rate (all entities) |
|---|---|---|
| AssemblyAI-STT-3.7-Realtime-Agent | 4.53% | 13.2% |
| Universal-3.6 Pro Realtime | 5.26% | 13.6% |
| Soniox Realtime v6 | 6.02% | 15.2% |
| ElevenLabs Scribe v3 Live | 7.38% | 16.9% |
| Deepgram Nova-3 | 8.64% | 25.1% |
Source: AssemblyAI's voice-agent benchmark, 12,460 English calls, every provider through the same harness with no key terms or context. The research post breaks entity error down by class, and AssemblyAI-STT-3.7-Realtime-Agent makes fewer errors than every other provider on each class it shows, phone numbers included. The full field is on the benchmarks page.
Turn detection
Realtime Agent doesn't end a turn on silence alone. When the speaker pauses for min_turn_silence, the model checks whether what's been said reads as a finished turn. If the turn ends in an entity that may still continue, such as half a phone number, it holds the turn open until max_turn_silence. The docs call this entity-aware endpointing, and it's on in every mode. You steer the trade-off with one mode preset (min_latency, balanced, max_accuracy) and fine-tune with the two silence values.
Once the user stops speaking, the final transcript arrives in 86 ms, against 172 ms for Universal-3.6 Pro Realtime, measured from the end of speech to the final transcript on AssemblyAI's latency benchmark.
Conversation context
With context carryover, the model hears each user turn in the context of what your agent just said and what the user said earlier. When your agent asks "What's your email address?", the model can produce user@assemblyai.com instead of "user at assemblyai dot com". In LiveKit it's on by default for the 3.7 Agent model. More below.
Why AssemblyAI for text-to-speech?
The same livekit-plugins-assemblyai package that runs your STT also ships assemblyai.TTS, from version 1.8.9. It speaks with assemblyai-tts-1, a model trained on millions of hours of audio, including real conversational data, and faster than other production voice agent TTS models.
What that means in a LiveKit agent:
- First audio fast. Production time to first audio is 90 ms. In the launch post's single-client lab test, median time to first byte was 47 ms. That's a lab figure, and a caller on a real network hears more. The plugin sends each sentence of the LLM's reply as its own request, so the agent starts speaking after the first sentence.
- Details said right. On the launch post's pronunciation set, AssemblyAI-TTS-1 scored 93.7% entity accuracy, against 93.6% for ElevenLabs v4 and 82.5% for Cartesia Sonic 3.6. On Cekura's independent TTS benchmark it ranked #1 on phone numbers and codes as of November 10, 2026.
- One key, one bill. The same
ASSEMBLYAI_API_KEYcovers speech-to-text and text-to-speech. Pricing is $15 per 1M characters. AssemblyAI rate-limits new TTS sessions per minute (5 on a free plan, 200 to start on a paid plan, growing with use), not sessions open at once, and the plugin reuses one session for a whole call. - Voices. Thousands of voices, plus cloned voices, in six languages: English, Spanish, German, French, Italian and Portuguese.
One API key covers AssemblyAI-STT-3.7-Realtime-Agent for speech-to-text and AssemblyAI-TTS-1 for the agent's voice. Plug both into LiveKit with a single plugin.
Prerequisites
- Python 3.11+
- A microphone and speakers for local testing. Headphones help, so the agent doesn't hear its own voice.
- API keys for:
- AssemblyAI: free tier available at assemblyai.com. This one key covers speech-to-text and text-to-speech.
- LiveKit Cloud: free tier available at livekit.io.
- OpenAI.
Step 1: Installation
Create a virtual environment and install the dependencies:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install "livekit-agents[assemblyai,silero,openai,codecs]>=1.8.12" python-dotenvThat one install covers the three plugins this agent uses: assemblyai (STT and TTS), openai (the LLM) and silero (VAD).
Version note: 1.8.12 is the first livekit-plugins-assemblyai release that accepts assemblyai-stt-3-7-realtime-agent. Older installs reject the model string, and anything before 1.8.9 also fails with an AttributeError on assemblyai.TTS. If you hit either, run pip install --upgrade "livekit-agents[assemblyai,silero,openai,codecs]>=1.8.12".
Step 2: Configure your API keys
Create a .env file in your project root:
LIVEKIT_URL=wss://your-project.livekit.cloud
LIVEKIT_API_KEY=your_livekit_api_key
LIVEKIT_API_SECRET=your_livekit_api_secret
ASSEMBLYAI_API_KEY=your_assemblyai_key
OPENAI_API_KEY=your_openai_keyThere's no separate TTS key: assemblyai.STT and assemblyai.TTS both read ASSEMBLYAI_API_KEY. Get it from the AssemblyAI dashboard under API Keys. Get your LiveKit URL, API key and secret from your LiveKit Cloud project settings.
Step 3: Build the agent
The complete code is in the companion repo on GitHub. Create a file called agent.py and add the following:
from dotenv import load_dotenv
from livekit import agents
from livekit.agents import AgentSession, Agent, TurnHandlingOptions
from livekit.plugins import assemblyai, openai, silero
load_dotenv()
KYLA = "aai-kyla" # library slug of an AssemblyAI voice
VAD_THRESHOLD = 0.2 # AssemblyAI's default; Silero should match it
class Assistant(Agent):
def __init__(self) -> None:
super().__init__(
instructions=(
"You are a helpful voice AI assistant. Reply in short, "
"plain sentences with no markdown, lists or emoji."
)
)
async def entrypoint(ctx: agents.JobContext):
await ctx.connect()
tts = assemblyai.TTS(
model="assemblyai-tts-1",
voice=KYLA,
)
tts.prewarm() # Open the TTS session now, not on the first reply
session = AgentSession(
stt=assemblyai.STT(
model="assemblyai-stt-3-7-realtime-agent", # AssemblyAI-STT-3.7-Realtime-Agent
mode="balanced", # min_turn_silence=128, max_turn_silence=1280
vad_threshold=VAD_THRESHOLD, # Match Silero's activation_threshold below
),
llm=openai.LLM(model="gpt-4o"),
tts=tts,
vad=silero.VAD.load(
activation_threshold=VAD_THRESHOLD,
),
turn_handling=TurnHandlingOptions(
turn_detection="stt", # Use AssemblyAI's end-of-turn signal directly
endpointing={"min_delay": 0}, # Avoid additive delay in STT mode
),
use_tts_aligned_transcript=True, # Word-timed transcripts from the TTS
)
await session.start(
room=ctx.room,
agent=Assistant(),
)
await session.generate_reply(
instructions="Greet the user and offer your assistance."
)
if __name__ == "__main__":
agents.cli.run_app(
agents.WorkerOptions(entrypoint_fnc=entrypoint)
)Here's what each part does.
The Assistant class
Agent is where you define your agent's personality and behavior. The instructions string is the system prompt, and it goes directly to the LLM. This is where you'd define your agent's persona, rules and any context it needs. Asking for plain sentences matters for voice: markdown and lists read badly out loud.
The AgentSession
This is the core of your agent. You're wiring together four components:
- stt: AssemblyAI-STT-3.7-Realtime-Agent, set with
model="assemblyai-stt-3-7-realtime-agent", along withmode="balanced"and a VAD threshold (more below). - llm: OpenAI GPT-4o. Swap the model string to use GPT-4o mini or any other OpenAI-compatible model.
- tts: AssemblyAI text-to-speech on
assemblyai-tts-1, with an explicit voice, Kyla (aai-kyla).tts.prewarm()opens the WebSocket session while the agent joins the room, so the greeting doesn't wait on a handshake. - vad: Silero VAD, for interruption handling.
activation_thresholdis set to 0.2 to match the STT'svad_threshold, which is AssemblyAI's default (Silero's own default is 0.5). Keeping them aligned avoids a dead zone where one system thinks the user is speaking and the other doesn't.
use_tts_aligned_transcript=True tells LiveKit to use the per-word timings the TTS plugin sends. Your frontend transcript follows the agent's speech word by word. When the user cuts the agent off, the chat history keeps the reply only up to the word the user heard, so the LLM doesn't think it said things it didn't.
Turn detection with turn_detection="stt"
Setting turn_detection="stt" tells LiveKit Agents to use AssemblyAI's own end-of-turn signal instead of LiveKit's turn detector. It's the recommended setup for this model. Pair it with endpointing={"min_delay": 0} so you don't stack delay on top of the STT's response, and set mode="balanced", which applies min_turn_silence=128 and max_turn_silence=1280. With mode unset, the plugin defaults both to 100 ms, which is too aggressive for STT-based turn detection.
The entrypoint function
This runs when a new job comes in. ctx.connect() joins the LiveKit room. Then we start the session and fire off an initial greeting. The agent keeps running until the room closes or the session ends.
Step 4: Run it
There are two modes for running locally.
Console mode
Console mode lets you talk to the agent directly from your terminal, with no LiveKit Cloud connection. It's the fastest way to test.
python agent.py consoleSpeak into your microphone. You'll see transcripts printed in real time, and the agent's responses play through your speakers. Recent livekit-agents releases print a deprecation notice for console and point at lk agent console, which runs the same mode through the LiveKit CLI.
Dev mode
Dev mode connects your agent to LiveKit Cloud and makes it available through the Agents Playground:
python agent.py devThen open agents-playground.livekit.io, enter your LiveKit URL and API key, and click Connect.
Text-to-speech with AssemblyAI
The quickstart above is all most agents need. This section covers the TTS options you'll reach for once it's running. The full parameter list is in the AssemblyAI TTS on LiveKit docs.
Choose a voice and language
voice takes the library slug of an AssemblyAI voice, such as aai-kyla, a voice ID (a UUID), or the slug of a voice you cloned. The voice catalog in the AssemblyAI dashboard holds the full list. Set voice explicitly: the plugin picks a default of its own, which differs from the API's default English voice, aai-kyla.
language takes a code ("es") or an English name ("spanish"). The API doesn't detect language, so set it to whatever your LLM writes:
tts = assemblyai.TTS(
model="assemblyai-tts-1",
voice="aai-antonioluis", # a Spanish voice
language="es",
)For the best results, pick a voice whose own language matches the text.
Interruptions keep the session
When the user barges in, the plugin sends Cancel on the open session and drops the audio still in flight. The session stays open, so the next reply doesn't pay for a new handshake. Barge-in itself is still driven by Silero VAD and AssemblyAI's SpeechStarted signal on the STT side.
Sessions, idle time and long calls
The plugin reuses one WebSocket session for many replies. Two limits to know:
- A session closes after two minutes with no frame either way, and the plugin doesn't send
KeepAlive. If your agent stays quiet that long (say, while the user reads out a long policy number), the plugin logs a warning and the next reply opens a new session. - A session lasts at most an hour. The plugin won't start a reply on a session about to expire; it opens a fresh one instead.
Sample rate and telephony
sample_rate defaults to 24000 Hz, the model's native rate, and accepts 8000, 16000, 22050, 24000, 44100 or 48000. LiveKit resamples for the room, so you rarely need to change it. If you're putting the agent on a phone line through LiveKit SIP, our explainer on μ-law vs A-law for TTS on phone calls covers what happens to the audio on the way to the caller.
Keep data in the EU
base_url sets the data zone for each model. Point the TTS and LLM Gateway at their EU hosts to keep text and audio in the EU, and the STT at its EU host:
stt=assemblyai.STT(model="assemblyai-stt-3-7-realtime-agent", base_url="wss://streaming.eu.assemblyai.com")
tts=assemblyai.TTS(model="assemblyai-tts-1", voice=KYLA, base_url="wss://tts.eu.assemblyai.com")
llm=openai.LLM(model="claude-sonnet-4-6", base_url="https://llm-gateway.eu.assemblyai.com/v1", api_key=os.environ["ASSEMBLYAI_API_KEY"])The EU TTS host runs in eu-north-1 (Stockholm). The EU LLM Gateway serves Anthropic Claude and Google Gemini models only, so the EU example uses claude-sonnet-4-6 rather than the US example's gemma-4-31b. A cloned voice only works on the host of the zone it was created in.
Run all three models on one key
If you'd rather not hold an OpenAI key, point the OpenAI plugin at LLM Gateway, which speaks the OpenAI Chat Completions API. STT, LLM and TTS then all run on ASSEMBLYAI_API_KEY:
import os
llm = openai.LLM(
model="gemma-4-31b",
base_url="https://llm-gateway.assemblyai.com/v1",
api_key=os.environ["ASSEMBLYAI_API_KEY"],
)The LiveKit Inference alternative for TTS
LiveKit Inference also serves AssemblyAI text-to-speech as assemblyai/assemblyai-tts-1. It runs on LiveKit's infrastructure, needs no AssemblyAI key, and bills and rate-limits through LiveKit Cloud:
from livekit.agents import AgentSession, inference
session = AgentSession(
tts=inference.TTS(
model="assemblyai/assemblyai-tts-1",
voice="aai-kyla",
language="en",
),
# stt, llm, vad, turn_handling as above
)Use the plugin when you want AssemblyAI billing and limits on your own account. Use Inference when you'd rather keep TTS on your LiveKit bill. For the STT side, keep the assemblyai.STT plugin for the 3.7 Agent model.
Tuning turn detection
Realtime Agent's turn detection runs on two silence values and one mode preset. The defaults work for general conversational agents; tune from there.
stt=assemblyai.STT(
model="assemblyai-stt-3-7-realtime-agent",
mode="balanced", # "min_latency" (fastest) · "balanced" · "max_accuracy"
# Explicit values win over the preset. These two match "balanced":
min_turn_silence=128, # ms of silence before the end-of-turn check
max_turn_silence=1280, # hard ceiling: turn ends after this much silence regardless
)How to think about each one:
- mode: the highest-level dial.
min_latencyfor snappy back-and-forth,max_accuracyfor entity-heavy or deliberate speech. It setsmin_turn_silenceto 128 / 128 / 512 ms andmax_turn_silenceto 640 / 1280 / 2560 ms formin_latency/balanced/max_accuracy. - min_turn_silence: how long the model waits before it checks whether the turn is done. If the turn reads as complete, it ends; if it ends in an entity still in progress, it stays open.
- max_turn_silence: the hard ceiling, and the limit on how long an entity in progress is held open. Raise it to 2000 ms or more for users who speak deliberately or read numbers off a card.
Entity-aware endpointing keeps most phone numbers and account IDs in one turn without any tuning. When your agent knows an entity is coming, you can widen the window mid-session without reconnecting:
# Widen the window while the user dictates an address or account number
stt.update_options(max_turn_silence=3000)
# Later, reset to the balanced default
stt.update_options(max_turn_silence=1280)Conversation context (context carryover)
Realtime Agent keeps a short, per-session memory of the dialog and takes your agent's most recent reply as context for the next user turn. With the agent's question in context, the model can anticipate the answer, sharpen entity recognition and pick the right one of two similar-sounding words. The biggest wins are on short replies ("yes", "7pm", single names) and spelled-out entities. The research post describes how the model also uses this context to tell the user apart from background speech.
In LiveKit it's on by default for the 3.7 Agent model: the session forwards each agent reply to the STT after every turn, with no event wiring and no reconnects. The switch lives on AgentSession (the older agent_context_carryover flag on assemblyai.STT is deprecated):
session = AgentSession(
stt=assemblyai.STT(model="assemblyai-stt-3-7-realtime-agent"),
stt_context_options={"forward_chat_context": True}, # the default; False opts out
# llm=..., tts=..., vad=...
)Our walkthrough of agent context carryover in LiveKit goes deeper.
Stream noisy calls, spelled-out codes and one-word answers through AssemblyAI-STT-3.7-Realtime-Agent and watch turn detection and context carryover work before you wire up LiveKit.
Enabling keyterm prompting
If your agent handles domain-specific vocabulary (product names, drug names, financial jargon, brand names), boost recognition with keyterm prompting. It takes effect immediately, with no restart:
# After session.start(). update_options is synchronous, so don't await it.
session.stt.update_options(
keyterms_prompt=["AssemblyAI", "LiveKit", "Acme Premier Plus"]
)It's useful for structured data like account numbers, product names or SKUs. Keyterm prompting is included on AssemblyAI-STT-3.7-Realtime-Agent at no extra cost.
Handling noisy audio with Voice Focus
For calls from cars, kiosks, call-center floors or laptop mics, enable Voice Focus. It's server-side noise suppression that isolates the primary voice and suppresses background audio before it reaches the model. Voice Focus is available on the Agent model. Use near-field for close-talking mics (headsets, handsets) and far-field for distant capture (rooms, kiosks):
stt=assemblyai.STT(
model="assemblyai-stt-3-7-realtime-agent",
voice_focus="far-field", # "near-field" for close-talking mics
)Prefer this to running your own client-side noise cancellation, which tends to introduce artifacts that hurt accuracy more than the noise itself.
Swapping components
LiveKit Agents makes it easy to swap providers. The interfaces for STT, LLM and TTS are consistent, so you change the plugin, not the surrounding code.
To swap the LLM from GPT-4o to Claude:
from livekit.plugins import anthropic
session = AgentSession(
stt=assemblyai.STT(model="assemblyai-stt-3-7-realtime-agent"),
llm=anthropic.LLM(model="claude-sonnet-5"),
tts=assemblyai.TTS(model="assemblyai-tts-1", voice=KYLA),
)To swap TTS to another provider, such as Cartesia or ElevenLabs, install its plugin and change one line:
from livekit.plugins import elevenlabs
tts=elevenlabs.TTS(voice_id="your-voice-id")If you're weighing TTS providers for this slot, our roundup of the best TTS APIs for voice agents compares them on latency and entity accuracy. Be more careful with the STT layer, because that's where your accuracy comes from. The rest of the pipeline swaps freely.
Next steps
You now have a working voice agent on AssemblyAI-STT-3.7-Realtime-Agent and AssemblyAI text-to-speech. A few directions from here:
- Deploy to LiveKit Cloud: run
python agent.py startto register your agent as a persistent worker. Our production LiveKit voice agent guide covers tool calling, tests and deployment on an all-AssemblyAI stack. - Add tool calling: give your agent the ability to look things up, take actions or connect to your backend through the LLM layer.
- Enable speaker labels: for multi-party calls, the Agent model supports realtime speaker labels. Turn them on with
assemblyai.STT(..., speaker_labels=True). With labels on, the server applies diarization-tuned turn defaults. - Add telephony: LiveKit has native SIP support. Pair it with Telnyx or Twilio and your agent is live on a phone number.
- Prefer Pipecat? The same stack runs there too: see our Pipecat voice agent with AssemblyAI tutorial.
Already running Universal-3.6 Pro Realtime? It's still fully supported. Moving to the Agent model is a one-line change to the model string plus the >=1.8.12 plugin pin. The full parameter reference for AssemblyAI on LiveKit is in the LiveKit integration docs.
Start free with AssemblyAI-STT-3.7-Realtime-Agent at $0.45/hr and AssemblyAI text-to-speech at $15 per 1M characters, on one API key. No credit card required.
Frequently Asked Questions (FAQs)
What is the best streaming speech-to-text model for a LiveKit voice agent?
AssemblyAI-STT-3.7-Realtime-Agent (assemblyai-stt-3-7-realtime-agent) is AssemblyAI's model built for voice agents. On AssemblyAI's voice-agent benchmark it has the lowest normalized word error rate (4.53%) and entity error rate (13.2%) of the 26 streaming models we ran, ahead of Soniox Realtime v6, ElevenLabs Scribe v3 Live and Deepgram Nova-3, and against Universal-3.6 Pro Realtime it makes 80% fewer number errors on Voice Code Bench. In LiveKit it plugs in with assemblyai.STT(model="assemblyai-stt-3-7-realtime-agent") on livekit-agents 1.8.12 or later.
Which livekit-agents version supports AssemblyAI-STT-3.7-Realtime-Agent?
livekit-plugins-assemblyai 1.8.12, released November 13, 2026, is the first version that accepts the assemblyai-stt-3-7-realtime-agent model ID. Install it with pip install "livekit-agents[assemblyai]>=1.8.12". The plugin still defaults to universal-3-6-pro, so set model explicitly.
Does AssemblyAI have a LiveKit TTS plugin?
Yes. assemblyai.TTS ships in livekit-plugins-assemblyai 1.8.9 and later, in the same package as assemblyai.STT, and speaks with the assemblyai-tts-1 model. Pass it as tts= on your AgentSession. LiveKit Inference also serves it as assemblyai/assemblyai-tts-1 if you'd rather bill through LiveKit Cloud.
How do I use AssemblyAI's turn detection in LiveKit?
Set turn_detection="stt" in TurnHandlingOptions and endpointing={"min_delay": 0}, then pick a mode on assemblyai.STT. balanced applies a 128 ms end-of-turn check and a 1280 ms ceiling, and entity-aware endpointing holds the turn open while a caller reads out a number. Adjust max_turn_silence mid-session with update_options when your agent expects a long entity.
Can I run STT, LLM and TTS on one AssemblyAI API key in LiveKit?
Yes. assemblyai.STT and assemblyai.TTS both read ASSEMBLYAI_API_KEY, and the LiveKit OpenAI plugin can point at AssemblyAI's LLM Gateway (base_url="https://llm-gateway.assemblyai.com/v1") with that same key. That gives you one key, one bill and one set of logs for the whole speech-to-speech loop.
How much does a LiveKit voice agent on AssemblyAI cost?
AssemblyAI-STT-3.7-Realtime-Agent is $0.45/hr, billed on session duration, with keyterm prompting included. AssemblyAI text-to-speech is $15 per 1M characters. Streaming speech-to-text limits only new sessions per minute (200 to start on a paid plan, rising 10% whenever you open 80% or more of the limit), with no cap on open sessions. Your LLM and LiveKit Cloud usage bill separately, and AssemblyAI has a free tier to build and test before adding a card.