faint-gold-41196
03/03/2026, 4:02 AMtall-airline-16756
03/03/2026, 4:03 AMtall-airline-16756
03/03/2026, 4:03 AMsession = AgentSession(
turn_detection=MultilingualModel(),
stt=inference.STT(language="hi"), # use "ta", "te", "kn", "ml", etc. for other languages
# ... vad, tts, llm, etc.
)
1. Use a regionally hosted STT model where possible (Deepgram Nova-3 hosted in India or Sarvam AI) to improve recognition quality and latency.
2. Deploy agents and models in the India region (LiveKit Cloud Mumbai / ap-south) to reduce latency and improve real-time behavior.
3. Update model files regularly:
◦ Python: uv run agent.py download-files
◦ Node.js: pnpm run download-files
1. Pair the turn detector with a reliable VAD (Silero VAD is recommended) and tune endpointing:
◦ Start with min_endpointing_delay = 0.5s and max_endpointing_delay = 3.0s and adjust based on your conversational style and latency tolerance.
1. Enable Agent Observability to monitor turn decisions and session replays so you can iteratively tune parameters and diagnose misdetections.
Why v0.4.1-intl helps for Indian languages
• v0.4.1-intl is designed for multilingual use and handles mixed-language conversations better, which helps when users code-switch between regional languages and English.
• It reduces false interruptions significantly compared to previous versions and improves structured-input handling (phone numbers, addresses), which is useful for real-world voice agents.
Quick checklist I recommend you try
• Confirm which Indian languages you need to support (list them).
• Configure STT language per session or per caller.
• Use Deepgram Nova-3 or Sarvam AI for STT (hosted in India).
• Deploy in ap-south region.
• Enable observability and collect a few sample sessions to tune endpointing and VAD.
If you tell me which exact languages (e.g., Hindi + English, Tamil-only, or mixed set) and your use case (IVR, customer support agent, voice bot for forms, etc.), I can provide tailored parameter values and more specific tuning tips.
Sources: Improved End-of-Turn Model Cuts Voice AI Interruptions 39% | Building the all-in-one platform for voice AI agents | Building Performant Voice Agents in India | LiveKit | LiveKit turn detector plugin | LiveKit Documentation | Updating the Turn Detector Model | LiveKitfaint-gold-41196
03/03/2026, 4:31 AMtall-airline-16756
03/03/2026, 4:31 AMpip install --upgrade livekit-agents
1. Download the latest model files:
uv run agent.py download-files
If you’re using Node.js:
1. Update the package (if needed):
pnpm update livekit-agents
1. Download the latest model files:
pnpm run download-files
Notes and quick tips
• Ensure you use the MultilingualModel (v0.4.1-intl) in your agent config to get the latest multilingual improvements.
• If you redeploy your agent in your environment or LiveKit Cloud, model files will be re-downloaded during deployment — running the download command is mainly needed for local development or manual updates.
• If you want, tell me whether you’re on Python or Node and whether you’re updating a local dev machine or a deployed agent; I can give any follow-up steps (service restart, verifying version, etc.). Sources: Updating the Turn Detector Model | LiveKitfaint-gold-41196
03/03/2026, 7:01 AMtall-airline-16756
03/03/2026, 7:02 AMMultilingualModel (v0.4.1-intl)
◦ Confidence / eagerness: enable semantic VAD when available with medium eagerness (balanced but responsive).
1. Endpointing delays
◦ min_endpointing_delay = 0.2 seconds (reduces minimum wait before concluding a turn)
◦ `max_endpointing_delay = 1.0`–`1.5` seconds (shorter max to reduce tail latency; increase if you see truncated speech)
1. VAD
◦ VAD model: Silero VAD
◦ Use server-side VAD/semantic VAD where possible (server-side is typically lower-latency than client-side)
◦ Pre-warm VAD at startup so the first interactions don’t incur model-load delay
1. STT
◦ Provider: Deepgram Nova-3 (India) or Sarvam AI hosted in India
◦ Set language explicitly: language="hi"
◦ Enable any provider-side phrase/semantic endpointing features (these can speed up finalization)
1. Deployment & networking
◦ Deploy agent and models in ap-south (Mumbai) to minimize RTT
◦ Co-locate STT in India to avoid cross-region hops
◦ Use stable, low-jitter network links for your agent host
1. Agent lifecycle & runtime
◦ Keep the agent process warm (avoid cold-starts)
◦ Pre-download model files: run the download command during deploy or local dev so there’s no on-demand model fetch
▪︎ Python: uv run agent.py download-files
▪︎ Node.js: pnpm run download-files
1. Monitoring & tuning
◦ Enable Agent Observability / session replay to inspect false positives/negatives and measure latency.
◦ Iteratively adjust:
▪︎ Lower min_endpointing_delay further (e.g., 0.15s) if false truncation isn’t a problem.
▪︎ Increase max_endpointing_delay if you cut off long responses.
◦ Collect a few sample Hindi sessions and tune using real logs.
Trade-offs to be aware of
• Lower endpointing delay increases risk of cutting off long or breathy speakers. If you see truncated speech, raise max_endpointing_delay or increase semantic VAD eagerness slightly.
• Extremely aggressive settings may increase false starts; use observability to find the sweet spot for your user population.
If you want, I can:
• Suggest a specific config block for your Python or Node agent.
• Recommend exact semantic VAD/eagerness values based on your use case (IVR vs conversational agent).
Tell me whether you use Python or Node and whether this is for IVR, customer support, or an always-on conversational bot, and I’ll provide a tuned config you can paste into your agent.
Sources: How to match the latency of the homepage agent | LiveKit | VAD and turn detection configuration guide | LiveKit | Deepgram STT | LiveKit Documentation | Building Performant Voice Agents in India | LiveKit | LiveKit turn detector plugin | LiveKit Documentationfaint-gold-41196
03/04/2026, 7:40 AMtall-airline-16756
03/04/2026, 7:41 AMlanguage="hi" (or appropriate code) for Hindi.
• Sarvam AI (via LiveKit Agents plugin) — Strong coverage for many Indian languages (Hindi, Tamil, Telugu, Kannada, Malayalam, Bengali, Marathi, Gujarati, Punjabi, Odia). Good accuracy and language support; deploy close to your agent to minimize latency.
• Cartesia Ink Whisper (via LiveKit Inference) — Supports Hindi and many other languages; useful when you need broad multilingual coverage.
Practical settings and deployment tips to minimize latency
1. Deploy regionally
◦ Host your agent and models in LiveKit Cloud Mumbai (ap-south) so Agent ↔️ STT RTT is minimal.
1. Use streaming recognition
◦ Always enable streaming/real-time transcription from the STT provider rather than batching.
1. Co-locate STT in India
◦ Configure the STT provider to use their India region (Deepgram Nova-3 is routed regionally when supported languages are selected).
1. Tune endpointing & VAD
◦ Use provider-side semantic/phrase endpointing when available (speeds finalization).
◦ Pair with a fast VAD (Silero VAD recommended) and pre-warm the VAD model to avoid cold-start delays.
1. Keep the agent warm and pre-download models
◦ Avoid cold starts by keeping the agent process running and pre-downloading any model files before traffic.
◦ Download command for local/dev: Python uv run agent.py download-files or Node pnpm run download-files.
1. Network & quality
◦ Use stable low-jitter networks and optimized audio capture (16 kHz mono, good SNR) for faster and more accurate streaming results.
Which to pick
• If lowest latency in Hindi is your primary metric: start with Deepgram Nova-3 (India) via LiveKit Inference.
• If you need broad Indian language coverage beyond Hindi and fine-grained control: evaluate Sarvam AI.
• If you want broad multilingual support and a single model: try Cartesia Ink Whisper and compare latency/accuracy.
If you want, I can:
• Provide exact LiveKit STT configuration snippets for Deepgram Nova-3 or Sarvam AI.
• Suggest network and audio capture settings specific to your environment.
Tell me which provider you want to try first (Deepgram, Sarvam, or Cartesia) and whether you’re using Python or Node, and I’ll give a ready-to-use config.
Sources: Building Performant Voice Agents in India | LiveKit | Deepgram STT | LiveKit Documentation | Speech-to-text (STT) models overview | LiveKit Documentation | Sarvam STT plugin guide | LiveKit Documentation | Live Conversations with AI using ChatGPT and WebRTCfaint-gold-41196
03/04/2026, 7:45 AMtall-airline-16756
03/04/2026, 7:45 AM"deepgram/nova-3:hi" or "cartesia/ink-whisper:hi".
◦ Example indicator: your AgentSession or config passes a string for stt instead of an object.
◦ No provider-specific API key in your environment is required (authentication goes through LiveKit).
• STT configured as a plugin (standard/plugin-based):
◦ Look for imports and instantiation of a provider plugin, e.g., from livekit.plugins import deepgram or deepgram.STT() (Python) or similar in Node.
◦ Example indicator: your code passes an STT plugin instance to AgentSession, such as stt=deepgram.STT(api_key=...).
◦ You’ll typically have provider API keys (e.g., DEEPGRAM_API_KEY) in environment variables.
What to look for in files
1. Code (AgentSession / config)
◦ If you see stt="provider/model:lang" → LiveKit Inference.
◦ If you see stt=deepgram.STT(...) or new DeepgramSTT(...) → plugin-based.
1. Dependencies / packages
◦ If your project installs provider plugins (e.g., livekit-plugins-deepgram) → plugin setup.
◦ If you only have livekit-agents and no provider plugin packages, you’re likely using Inference or built-in models.
1. Environment variables
◦ Presence of provider API keys (DEEPGRAM_*, SARVAM_*, etc.) → plugin-based.
◦ Only LiveKit API keys and no provider keys → likely LiveKit Inference.
If you want, paste the small snippet where you create your AgentSession or your package.json/requirements.txt and I’ll point out exactly which method you’re using and what to change if you want to switch to (or confirm) LiveKit Inference.
Sources: Models overview | LiveKit Documentation | Speech-to-text (STT) models overview | LiveKit Documentation | Build a multilingual voice agent that automatically switches languages | Li... | Transcriber | LiveKit Documentationfaint-gold-41196
03/04/2026, 7:49 AMtall-airline-16756
03/04/2026, 7:49 AMstt='deepgram/nova-3:hi')."
Tell me which prompt you prefer (short vs guided) or paste the AgentSession snippet and I’ll point out the exact lines for you.faint-gold-41196
03/04/2026, 7:54 AMSTT|stt|<http://speech.to|speech.to>.text|SpeechToText (**/agent.py), 20 results
Searched for regex STT_PROVIDER|stt|deepgram|soniox|sarvam|cartesia.*stt (**/*.py), 30 results
Read [](file:///d%3A/Tharun-09-sep/backend/agent.py#80-80), lines 80 to 100
Read [](file:///d%3A/Tharun-09-sep/backend/agent.py#2495-2495), lines 2495 to 2620
Read [](file:///d%3A/Tharun-09-sep/backend/agent.py#135-135), lines 135 to 155
Here's the full picture:
---
## Current Configuration: Provider Plugin (not LiveKit Inference)
Your STT is configured via LiveKit provider plugins. The active provider is set in your .env at line 107:
dotenv
STT_PROVIDER=cartesia
This routes through the plugin selection logic in agent.py:
python
stt_provider = os.getenv("STT_PROVIDER", "auto").lower()
# ...
if stt_provider == "cartesia":
stt_service = cartesia.STT(
model="ink-whisper",
language=_cartesia_lang,
api_key=_cartesia_key,
)
The imports at agent.py confirm all four are direct provider plugins:
python
from livekit.plugins import (
deepgram, # deepgram.STT(...)
openai,
silero,
groq,
cartesia, # cartesia.STT(...) ← currently active
sarvam, # sarvam.STT(...)
)
from livekit.plugins import soniox # soniox.STT(...)
---
## Provider-specific environment variables in your .env
| Variable | Value set? | Used by |
|---|---|---|
| DEEPGRAM_API_KEY | Yes | deepgram.STT (fallback) |
| SARVAM_API_KEY | Yes | sarvam.STT |
| SONIOX_API_KEY | Yes | soniox.STT |
| CARTESIA_API_KEY | Yes | cartesia.STT (active) |
| STT_PROVIDER | cartesia | Provider selector |
---
## How to switch to LiveKit Inference
LiveKit Inference routes STT through the LiveKit server itself (using stt.StreamAdapter or the built-in inference service) rather than calling a third-party API directly from the agent worker. Your codebase doesn't use it — every path instantiates a vendor plugin directly.
To switch, you would not change the .env alone; you'd need to replace the plugin instantiation in agent.py with something like:
python
from livekit.plugins import openai # or the inference-compatible plugin
stt_service = stt.StreamAdapter(
stt=openai.STT.with_livekit_inference(), # routes via LiveKit server
)
However, LiveKit Inference requires your LiveKit Cloud project to have inference enabled (it's billed separately and must be activated in the LiveKit dashboard). Your current LiveKit project (local-bfsi-fpv5on04.livekit.cloud) would need the inference add-on.
### One-line .env change alone won't do it
There is no STT_PROVIDER=livekit-inference branch in your code. You'd need to:
1. Add a code path in agent.py around agent.py:
python
elif stt_provider == "livekit":
stt_service = deepgram.STT.with_groq() # or .with_livekit_inference()
2. Then set in .env:
dotenv
STT_PROVIDER=livekit
### Recommendation
If your goal is simply the lowest-latency STT without code changes, you're already on a good path with cartesia (ink-whisper). If you specifically want LiveKit Inference for centralized billing/routing, you'd need to (a) confirm inference is enabled on your LiveKit Cloud project and (b) add a new branch in the STT provider switch block. Happy to implement that if you'd like.tall-airline-16756
03/04/2026, 7:54 AMSTT_PROVIDER=cartesia) with provider API keys present in .env.
• LiveKit Inference is not being used because your code instantiates provider plugin objects (e.g., cartesia.STT(...)) rather than passing an inference-style string to the agent.
If you want a single prompt to give your Copilot agent to verify this automatically, use this exact prompt (copy/paste):
"Search the project for where AgentSession (or the agent config) creates the STT service. Tell me whether STT is configured via LiveKit Inference (a provider/model string like provider/model:lang or stt.StreamAdapter) or via a plugin instance (e.g., cartesia.STT(...), deepgram.STT(...)). Return: 1) The exact file and line(s) that show the STT configuration, 2) Any STT-related environment variables found (DEEPGRAM_API_KEY, CARTESIA_API_KEY, etc.), 3) A one-line code change to switch to LiveKit Inference for Hindi if currently plugin-based (example: stt='deepgram/nova-3:hi'), and 4) Whether LiveKit Inference is enabled on the current LiveKit project (check project name/config if available)."
One-line quick actions you can run now
• To keep using low-latency STT without code change: continue with Cartesia (ink-whisper) — no action required.
• To switch to LiveKit Inference (requires code change + inference enabled on your LiveKit project), add a new branch in your STT provider switch and set the .env value. Example code snippet to add in agent.py:
elif stt_provider == "livekit":
# route STT through LiveKit Inference using a StreamAdapter or inference string
stt_service = stt.StreamAdapter(stt="deepgram/nova-3:hi")
And then set:
STT_PROVIDER=livekit
Notes and next steps
• LiveKit Inference must be enabled for your LiveKit Cloud project (it’s billed separately). Confirm in your LiveKit dashboard.
• If you want, I can:
◦ Produce the exact code diff to add the livekit branch into your provider switch.
◦ Provide the one-line LiveKit Inference config you should use (Deepgram Nova-3 or another) based on which provider you prefer.
Tell me which you want: a Copilot prompt only, or the code diff to switch your repo to LiveKit Inference (and which provider to route through: Deepgram / Cartesia / Sarvam).faint-gold-41196
03/04/2026, 7:58 AMtall-airline-16756
03/04/2026, 7:59 AMsession = AgentSession(
stt="deepgram/nova-3:hi",
turn_detection="multilingual/v0.4.1-intl",
# llm, tts as needed
)
• Or use the StreamAdapter pattern where appropriate:
stt_service = stt.StreamAdapter(stt="deepgram/nova-3:hi")
1. Deploy the agent
◦ Deploy via your usual flow (CLI or dashboard). During deployment the agent will route STT/LLM/TTS calls through LiveKit Inference.
1. Dashboard visibility
◦ After you run inference through your agent, the dashboard will show inference usage, concurrency limits, and billing. There isn’t an additional UI toggle to “enable” inference — usage is enabled by calling it from code.
Important prerequisites and notes
• Inference usage is billed under your LiveKit Cloud account. Ensure your plan supports the expected concurrency and usage.
• If you previously used provider plugins (deepgram/cartesia/sarvam) from the agent, you must update your code to pass inference model strings instead of instantiating provider plugin objects.
• If you want centralized billing or LiveKit-managed routing, switch the STT/LLM/TTS to inference strings as shown above.
If you’d like, I can:
• Generate the exact code diff to replace your current plugin-based STT branch with a LiveKit Inference branch (matching your repo’s provider-switch pattern).
• Provide the one-line inference strings you should use for Deepgram Nova-3, Cartesia, or Sarvam for Hindi.
Tell me which option you prefer and whether you’re using Python or Node, and I’ll prepare the exact snippet or diff.
Sources: Introducing LiveKit Inference: A unified model interface for voice AI | Models overview | LiveKit Documentation | How to match the latency of the homepage agent | LiveKit | Agent deployment overview | LiveKit Documentation | How much can LiveKit scale? | LiveKitfaint-gold-41196
03/04/2026, 8:54 AMSERVER_ERROR via LiveKit Inference, then no audio frames on retries. STT inference (deepgram/nova-3) is the only one working.
Edited
.env+1-1
Changed TTS_MODE=plugin in .env.
Summary of what works via LiveKit Inference on your project:
• STT (deepgram/nova-3) — working
• LLM (groq/llama-3.3-70b-versatile) — failing ("Error getting model definition")
• TTS (cartesia/sonic-3) — failing (Cartesia SERVER_ERROR)
Only STT stays on inference. LLM and TTS are back on plugins using your own API keys. Restart the agent.tall-airline-16756
03/04/2026, 8:54 AMTTS_MODE=plugin.
Here are focused troubleshooting steps and checks to help get LLM and TTS inference working again.
1) Confirm model strings and config
• Verify the exact model strings you’re passing for inference:
◦ LLM: e.g. llm="groq/llama-3.3-70b-versatile"
◦ TTS: e.g. tts="cartesia/sonic-3"
• In your AgentSession or the stt/llm/tts config, make sure you use inference-style strings (not plugin objects) when you want Inference.
2) Check project plan & model availability
• Ensure your LiveKit Cloud project supports inference and has quotas/concurrency for the requested models. Some large LLMs may require higher plan or quotas and can return “Error getting model definition” if the model isn’t allowed for your project.
3) Inspect dashboard/logs for errors
• Open the LiveKit dashboard (project usage/logs) and look for:
◦ Model definition/availability errors for the LLM request.
◦ TTS request logs showing Cartesia SERVER_ERROR and any returned status or error body.
• Dashboard logs often show more detail (quota, region mismatch, or provider-side errors).
4) Region / co-location & routing
• Confirm you’re routing to the correct region. If STT is routed to India and working, but LLM/TTS are routed elsewhere or to a provider region that’s restricted for your account, you may get errors.
• If Cartesia TTS is region-restricted or needs a specific routing (or provider-side key when used as plugin), that can cause SERVER_ERROR in inference mode.
5) Verify inference vs plugin env/config
• You changed TTS_MODE=plugin — confirm the agent actually used plugin branch (and that the Cartesia plugin API key is set).
• To test TTS inference explicitly, set the TTS config to the inference string and ensure no plugin instantiation overrides it:
◦ Example one-line change for inference:
▪︎ tts="cartesia/sonic-3:hi" (if language tagging is supported) or tts="cartesia/sonic-3"
• If switching back to inference, revert TTS_MODE and redeploy or restart the agent.
6) Reproduce with a minimal call
• Try a simple direct inference call (small script or curl-style test through the agent) to isolate the failure:
◦ Send a short TTS request (single short text) and watch the agent logs for request/response and any error payload from LiveKit/Cartesia.
◦ For LLM, request a small generation to see model-definition error details.
7) Retry/backoff & no audio frames issue
• Cartesia returned SERVER_ERROR then no audio frames on retries — that often indicates the provider returned an internal error or the connection closed before frames were produced.
• Capture the exact error response (stack trace or LiveKit inference logs) — look for:
◦ HTTP status and error body from Cartesia
◦ Any timeout/connection resets from the LiveKit side
• Try small retries with exponential backoff and log response headers/body for each attempt.
8) Quick checks you can run now
• Confirm environment variables present for plugin mode (if you use plugin): CARTESIA_API_KEY, GROQ_API_KEY etc.
• Confirm you are not mixing plugin and inference config for the same service (that can cause unexpected routing).
• Restart the agent after changes so configs and model routing refresh.
9) If LLM "Error getting model definition"
• Likely causes:
◦ Model not enabled/allowed for the project (quota or plan)
◦ Typo in the model string
◦ Temporary provider-side outage
• Actions:
◦ Verify model name exactly matches the supported inference model string.
◦ Check dashboard for model availability or quota limits for Groq models.
10) If you want, I can:
• Provide the exact minimal test snippet (Python or Node) to call Cartesia TTS via LiveKit Inference so you can reproduce and capture logs.
• Produce the exact code diff to switch your TTS/LLM branches between plugin and inference in your repo.
• Help parse the dashboard logs if you paste the relevant error payloads (error messages, HTTP status, or log snippets).
Next step suggestion
• Run one targeted test: set tts="cartesia/sonic-3" in the same place you set STT inference (and temporarily revert TTS_MODE if you changed behavior), restart the agent, then paste the first 10–20 lines of the agent log around the TTS request error and any dashboard error entries. I’ll analyze those and give the precise fix.
If you tell me whether you want the minimal test snippet for Python or Node, I’ll give it now.faint-gold-41196
03/04/2026, 8:59 AMtall-airline-16756
03/04/2026, 8:59 AMstt, llm, or tts are set).
◦ Your main entry file (e.g., agent.py or index.js) path if different.
1. Current dependencies
◦ Contents of requirements.txt or package.json (or just the livekit-agents version).
◦ Any installed plugin packages (e.g., livekit-plugins-deepgram, livekit-plugins-cartesia, livekit-plugins-sarvam).
1. .env (sanitized)
◦ Paste the relevant env entries (remove secrets) including: `LIVEKIT_API_KEY`/`LIVEKIT_API_SECRET`, STT_PROVIDER, TTS_MODE, STT_PROVIDER, CARTESIA_API_KEY, DEEPGRAM_API_KEY, GROQ_API_KEY, etc.
◦ Tell me if you have TTS_MODE=plugin or inference set.
1. Desired models & languages
◦ Which models do you want via inference (STT, LLM, TTS)?
◦ Model choices (examples): STT deepgram/nova-3:hi, LLM groq/llama-3.3-70b-versatile, TTS cartesia/sonic-3.
◦ Primary language(s) (e.g., Hindi).
1. Account / plan confirmations
◦ You said you’re on the free plan — confirm that’s the LiveKit Cloud free tier. (I’ll note that some large LLMs or certain inference features may be limited on free plans.)
1. Recent errors / logs
◦ Any error messages you saw when trying inference (LLM “Error getting model definition”, Cartesia SERVER_ERROR, agent logs around failures). Paste a short snippet (no secrets).
What I’ll deliver once you share the above:
• Exact one-line model strings and the code change (diff or snippet) to switch STT/LLM/TTS to LiveKit Inference for your language.
• Commands to update dependencies and download model files if needed.
• A minimal test snippet you can run locally to verify STT/LLM/TTS inference calls and capture logs.
• Notes about free-plan limitations and alternative options if a chosen model is restricted.
If you prefer, start by pasting:
• Your AgentSession block (5–15 lines) and
• The sanitized .env lines for LIVEKIT and STT/TTS/LLM keys.
I’ll then give the exact config and small test script to run locally.faint-gold-41196
03/04/2026, 9:04 AMC:\Users\abhis\...)
- Deployment: Docker on Linux (production)
---
2. AgentSession Configuration
python
# agent.py ~line 2672
session = AgentSession(
stt=stt_service, # inference string "deepgram/nova-3:en" OR deepgram.STT plugin
llm=llm_service, # "groq/llama-3.3-70b-versatile" string OR openai.LLM(base_url=groq)
tts=tts_service, # "cartesia/sonic-3:en" string OR cartesia.TTS plugin
vad=silero.VAD.load(min_silence_duration=0.3),
turn_detection=RobustMultilingualModel(), # semantic turn detector
allow_interruptions=True,
min_endpointing_delay=0.4,
max_endpointing_delay=0.5,
preemptive_generation=True,
aec_warmup_duration=0,
false_interruption_timeout=None,
resume_false_interruption=False,
)
Entry file: agent.py
---
3. Dependencies
livekit==1.0.25
livekit-agents==1.4.1 # <-- note: 1.4.1 in requirements.txt, 1.4.4 installed
livekit-api==1.1.0
livekit-plugins-cartesia==1.1.6
livekit-plugins-deepgram==1.1.6
livekit-plugins-google==1.2.8
livekit-plugins-groq==1.1.6
livekit-plugins-openai==1.2.8
livekit-plugins-sarvam>=0.6.0
livekit-plugins-soniox>=0.6.0
livekit-plugins-silero==1.4.1
livekit-plugins-turn-detector==1.4.1
livekit-plugins-noise-cancellation>=0.2.5
---
4. .env (sanitized)
dotenv
LIVEKIT_URL=
LIVEKIT_API_KEY=APIJD****
LIVEKIT_API_SECRET=ghCH****
DEEPGRAM_API_KEY=1bc****
GROQ_API_KEY=gsk_8jL****
CARTESIA_API_KEY=sk_ca****
SONIOX_API_KEY=fa4****
SARVAM_API_KEY=sk_ske****
GOOGLE_APPLICATION_CREDENTIALS=./credentials/tts-gcp.json
STT_PROVIDER=cartesia # plugin mode fallback
TTS_PROVIDER=cartesia
LLM_PROVIDER=groq
LLM_MODEL=llama-3.3-70b-versatile
# Inference toggles
STT_MODE=inference
LLM_MODE=plugin
TTS_MODE=plugin
STT_INFERENCE_MODEL=deepgram/nova-3
LLM_INFERENCE_MODEL=groq/llama-3.3-70b-versatile
TTS_INFERENCE_MODEL=cartesia/sonic-3
---
5. Desired Models & Languages
| Service | Desired inference model | Language(s) |
|---------|------------------------|-------------|
| STT | deepgram/nova-3 | en (English Indian), hi (Hindi) |
| LLM | groq/llama-3.3-70b-versatile | — |
| TTS | cartesia/sonic-3 | en, hi, mr |
Primary languages: English (Indian, en-IN), Hindi (hi-IN), Marathi (mr-IN)
---
6. Plan
LiveKit Cloud project local-bfsi-fp — need to confirm whether this project has the Inference add-on enabled. Free tier may not include all inference models.
---
7. Recent Errors
LLM inference (LLM_MODE=inference):
WARN failed to generate LLM completion: Error getting model definition, retrying in 0.1s
{"llm": "livekit.agents.inference.llm.LLM", "attempt": 1}
ERROR APIStatusError: Error getting model definition
ERROR APIConnectionError: failed to generate LLM completion after 4 attempts
TTS inference (TTS_MODE=inference):
WARN failed to synthesize speech: LiveKit Inference TTS returned error:
{"type":"error","code":"SERVER_ERROR","data":{"message":"An unexpected error occurred,
please contact <mailto:support@cartesia.ai|support@cartesia.ai> if the problem persists."},"retryable":true}
ERROR APIError: no audio frames were pushed for text: Hi, I am Priya calling ...
STT inference (STT_MODE=inference) — ✅ working fine:
INFO STT metrics {"model_name": "deepgram/nova-3", "model_provider": "livekit", ...}tall-airline-16756
03/04/2026, 9:05 AM# in agent.py (replace the plugin variables with strings)
session = AgentSession(
stt="deepgram/nova-3:hi", # or :en or :multi
llm="groq/llama-3.3-70b-versatile",
tts="cartesia/sonic-3:9626c31c-bec5-4cca-baa8-f8ba9e84c8bc",
vad=silero.VAD.load(min_silence_duration=0.3),
turn_detection=RobustMultilingualModel(),
allow_interruptions=True,
min_endpointing_delay=0.4,
max_endpointing_delay=0.5,
preemptive_generation=True,
)
Minimal test script to validate inference locally
• Save as test_inference.py and run with your LIVEKIT env set (no provider API keys if you want pure inference routing):
import asyncio
from livekit.agents import AgentSession
async def main():
session = AgentSession(
stt="deepgram/nova-3:en",
llm="groq/llama-3.3-70b-versatile",
tts="cartesia/sonic-3:9626c31c-bec5-4cca-baa8-f8ba9e84c8bc"
)
print("AgentSession created (inference attempt). Watch logs for LLM/TTS errors.")
await asyncio.sleep(1)
if __name__ == "__main__":
asyncio.run(main())
• Run: python test_inference.py and watch agent logs for model definition errors or TTS payloads.
If LLM still shows "Error getting model definition"
• Confirm Inference add-on is enabled (step 1).
• Try a simpler LLM to rule out model-specific restrictions:
◦ llm="openai/gpt-4.1-mini" (test purpose). If this works, groq/llama-3.3-70b may be restricted by plan/quota.
• Check LiveKit dashboard logs/metrics for the exact error and any quota/permission messages.
If TTS still shows Cartesia SERVER_ERROR / "no audio frames"
• Confirm the TTS inference model string includes a valid voice ID (example above).
• Test with a very short text sample to rule out timeout:
◦ "Hi" or "Hello" only.
• If error persists after valid voice ID and inference enabled, this likely is a provider-side error; capture the full agent log around the TTS request and the LiveKit dashboard inference logs (timestamps) so we can inspect the error body.
Docker notes
• Ensure your Docker image loads the same .env values. Example run:
◦ docker run --env-file .env -e LIVEKIT_URL=... your-image
• If you mounted .env in Windows, ensure path separators are correct inside container.
What I need from you next (pick any or all)
• Confirm whether LiveKit Inference add-on is enabled for project local-bfsi-fp.
• Paste the first ~20 lines of the agent log when you run the minimal test script (include the LLM error block and the TTS SERVER_ERROR block).
• Tell me whether you want me to produce a git-style code diff to switch your repo from plugin branches to inference strings (I can give the exact patch for agent.py).
• If you want quick fallback for Marathi TTS: confirm whether using Sarvam plugin as TTS is acceptable (Cartesia may not support Marathi).
If you confirm Inference is enabled and paste the log snippets, I’ll analyze the LLM/TTS error payloads and give the exact fix (voice ID, model change, or plan suggestion).
Sources: Speech-to-text (STT) models overview | LiveKit Documentation | Deepgram STT | LiveKit Documentation | Groq LLM plugin guide | LiveKit Documentation | How much can LiveKit scale? | LiveKit | OpenAI LLM models | LiveKit Documentation