i need to know how on my dev environemtn the voice...
# ask-ai
c
i need to know how on my dev environemtn the voice agent is working fine stt llm tts works fine, but then on prod using livekit-agents[cartesia,deepgram,silero,turn-detector, rime, openai, elevenlabs]==1.4.4 livekit-plugins-google==1.4.4 it breaks and does not say anything i tried google deepgram and eleven labs the agent just is stuck not generating anything at all. The session starts and everything agent works perfectly fine all 3 tts's work but as soon as I move to prod none of them work?? could this be a package issue cause i always see some kind of tts never arrived
✅ 1
t
Thanks for reaching out, Joshua. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I hear that TTS works in dev but in prod with those packages the agent starts but never speaks (you see “tts never arrived”). I can help troubleshoot — a few likely causes and quick checks plus one question to narrow this down. Quick checks (please verify in your prod environment) • Are provider API keys present in prod environment variables (e.g., CARTESIA_API_KEY, DEEPGRAM_API_KEY, ELEVENLABS_API_KEY) when you run agent plugins? Plugin-based integrations require those keys. • If you’re using LiveKit Inference string descriptors (e.g., "cartesia/.."), ensure you’re not expecting separate API keys — credentials are managed by LiveKit Cloud in that mode. Confirm which mode you use (plugin vs string descriptor). • Check agent logs in prod for TTS-related errors (authentication, network timeouts, or “no audio generated” messages). Look for lines around when session.say() or TTS synthesis is invoked. • Confirm outbound network egress from prod allows calls to provider endpoints (Deepgram/ElevenLabs/Google). Network restrictions often block TTS calls in prod. • Verify the same package versions/config (you listed 1.4.4). If dev and prod run identical versions, focus on environment/secret/network differences. • If you deploy via LiveKit CLI, ensure secrets were applied with
lk agent update-secrets
(or equivalent) so prod has the keys. One targeted question to narrow scope • Do you run TTS via plugin-based providers (requiring API keys) or via LiveKit Inference string descriptors? Send: • a recent excerpt of the agent logs showing the TTS attempt (error lines around the time the agent should speak) • how you configure TTS in AgentSession (code snippet) and whether API keys are set in prod I’ll use that to give exact next steps. , with interactive elements
c
API keys are set as we use the same stt and tts so then stt hears me but tts just does not output anything
t
Thanks — helpful detail that STT works but TTS produces no audio in prod. I’ll need a couple of quick things to pinpoint the problem. Please provide: 1. Whether you configure TTS via plugin (requires API keys in env) or via LiveKit Inference string descriptors (credentials managed by LiveKit Cloud). 2. A short prod log excerpt around the moment the agent calls TTS (lines showing session.say(), synthesis attempt, or any errors/warnings). 3. The AgentSession TTS config snippet you use (how you pass
tts=
). 4. Whether your prod environment restricts outbound network egress (firewall, VPC rules) to provider endpoints. With those I can identify whether this is auth, network, config, or runtime (e.g., blocked callbacks/caching) and give exact next steps. , with interactive elements
c
does session.say() intefere with the damn tts plugin?
t
Short answer: No —
session.say()
does not interfere with the TTS plugin. It calls the configured TTS to synthesize speech; if TTS is missing or failing,
session.say()
will produce no audio. What to check next (since STT works but TTS silent in prod) • Confirm a TTS instance/plugin is actually configured when you create the AgentSession (or you’re using a LiveKit Inference string descriptor). • Ensure the TTS plugin package is installed in prod (you listed the packages, but confirm they are present in the running environment). • Verify provider credentials in prod (even if STT keys work, TTS may use different keys or env names). • Check prod logs around the
session.say()
call for TTS errors (auth, network timeouts, “no audio generated”). Share that excerpt if possible. • Verify outbound network egress from prod allows calls to TTS provider endpoints (firewall/VPC rules can block synthesis requests). • If you pass pre-generated audio via
audio=
to
session.say()
, confirm those frames exist — supplying
audio
bypasses TTS. Quick clarifying question • Are you passing a TTS plugin instance to
AgentSession
or using a string descriptor (e.g., "cartesia/…")? If you can paste a short prod log snippet around the
session.say()
attempt and your
AgentSession
TTS config, I’ll pinpoint the exact failure and next step. Sources: Agent speech and audio | LiveKit Documentation | Cartesia TTS | LiveKit Documentation | OpenAI TTS plugin guide | LiveKit Documentation, with interactive elements