Hi team, I am trying to deploy my agent to LK clou...
# agents
d
Hi team, I am trying to deploy my agent to LK cloud with Elevenlabs for TTS. While it all works on our internal docker based deployments. Same build on LK is consistently giving the following error.- cc @echoing-kitchen-90064
Copy code
{
  "message": "failed to synthesize speech, retrying in 0.1s\nTraceback (most recent call last):\n  File \"/home/appuser/.local/lib/python3.11/site-packages/livekit/plugins/elevenlabs/tts.py\", line 420, in _run\n    await waiter\nlivekit.agents._exceptions.APITimeoutError: 11labs tts timed out after 10.0 seconds (body=None, retryable=True)\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"/home/appuser/.local/lib/python3.11/site-packages/livekit/agents/tts/tts.py\", line 357, in _main_task\n    await self._run(output_emitter)\n  File \"/home/appuser/.local/lib/python3.11/site-packages/livekit/plugins/elevenlabs/tts.py\", line 426, in _run\n    raise APIStatusError(\"Could not synthesize\") from e\nlivekit.agents._exceptions.APIStatusError: Could not synthesize (status_code=-1, request_id=None, body=None, retryable=True)",
  "level": "WARNING",
  "name": "livekit.agents",
  "tts": "livekit.plugins.elevenlabs.tts.TTS",
  "attempt": 1,
  "streamed": true,
  "pid": 101,
  "job_id": "AJ_vQwvvyYS7da6",
  "timestamp": "2025-09-11T07:59:45.012366+00:00"
}
Lib versions -
Copy code
livekit==1.0.12
livekit-agents==1.2.4
livekit-plugins-elevenlabs==1.2.4
✅ 1
Even weird, somehow worked for one deployment and not working for others
e
this seems like a transient issue, has it resolved?
11labs tts timed out after 10.0 seconds
taking a look at https://status.elevenlabs.io/ they did have some issues yesterday on the calendar, but i'm not able to see timestamps to check if they matched up. I know the sdk has a fallback adapter, not sure if that works with tts though. We're working on exposing more metrics around issues like this and offering additional workarounds when the services are down
d
I have been using fallback adapter, but the issue persisted. I have been seeing this for quite sometime. It always works on our internal architecture. I am expecting it to be something to do with either livekit infrastructure egress policies on new deployments or something. I deployed 4 agents, of which 1 worked reliably. I haven't scaled up since then because we have some demos lined up today. Will try again tomorrow and update you if it is resolved.
e
got it, please keep me updated, would love to track it down if it's on our side
🙌 1
d
I have a similar issue with the bitHuman plugin, it works totally fine locally and on AWS, but never connects when I deploy the agent via LiveKit.
e
Hmm that plugin should be working, wondering if it’s a resources issue? What project plan are you on @dry-balloon-74053 ?
a
im experiencing the same issue right now. Locally works without issues, but get
11labs tts timed out after 10.0 seconds
in prod
e
Is this intermittent or does it persist? What is your project id and/or agent id? Are you setting a specific 11labs api endpoint or using the default?
a
Is this intermittent or does it persist?
it persists
What is your project id and/or agent id?
agent id is A_BDEVyW5D822v
Are you setting a specific 11labs api endpoint or using the default?
nope. I tested with both turbo 2.5 and flash 2.5. all result in the issue above
e
A_BDEVyW5D822v
is a self-hosted agent, not a cloud-agent. you might need to check your firewall rules
a
i dont think i have any firewall rules and also im literally only experiencing this issues with elevenlabs TTS. No issue with any other TTS model
e
are you able to run a simple 11labs example using your key from your server e.g. one of these https://elevenlabs.io/docs/quickstart ? if that works the livekit sdk doesn't that may be an issue
a
so this is the actual api error i get
Copy code
elevenlabs.core.api_error.ApiError: headers: {'date': 'Mon, 15 Sep 2025 00:33:48 GMT', 'server': 'uvicorn', 'content-length': '476', 'content-type': 'application/json', 'access-control-allow-origin': '*', 'access-control-allow-headers': '*', 'access-control-allow-methods': 'POST, PATCH, OPTIONS, DELETE, GET, PUT', 'access-control-max-age': '600', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-trace-id': '2aeb06e3aa1746e7a364770ced7c1078', 'x-region': 'us-central1', 'via': '1.1 google, 1.1 google', 'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000'}, status_code: 401, body: {'detail': {'status': 'detected_unusual_activity', 'message': 'Unusual activity detected. Free Tier usage disabled. If you are using a proxy/VPN you might need to purchase a Paid Plan to not trigger our abuse detectors. Free Tier only works if users do not abuse it, for example by creating multiple free accounts. If we notice that many people try to abuse it, we will need to reconsider Free Tier altogether. \nPlease play fair and purchase any Paid Subscription to continue.'}}
i upgraded to a paid plan and now it works 🤷
👍 2
d
Nevermind, I git-ignored the .imx model file so it couldn't be found during the Docker build 🤦‍♂️
p
Hey @echoing-kitchen-90064 I'm getting the same issue when deploying to LiveKit Cloud and trying to use the agent:
Copy code
livekit.agents._exceptions.APITimeoutError: 11labs tts timed out after 10.0 seconds
...
livekit.agents._exceptions.APIStatusError: Could not synthesize (status_code=-1, request_id=None, body=None, retryable=True)
For extra context: • It works fine during dev, but is a persistent issue with the deployed version • agent ID is
AD_kpRTqQCmWZMp
• I'm on a paid ElevenLabs plan (creator) • I am using the ElevenLabs plugin rather than LiveKit inference so I can use custom voices • If I use another STT like Cartesia, it works fine, meaning LLM & TTS nodes are not the issue
e
hmm i don't see any issues on the hardware your agent is running on and i don't see any issues published from 11labs around that time. Have you tried using LK inference or the fallback adapter? it would let you avoid these types of issues.
p
for anyone finding this via search, I issued a new API key on my Elevnlabs (paid) account, and that seemed to fix the issue (strange tbh) potentially could have been the livekit cloud instance was still referring to my API key of the free tier account, but I'm pretty sure I updated it
t
Came here by search but none of the above worked for me. At the end it was that I was passing unsupported language to that specific voice and it returned same obscure
livekit.agents._exceptions.APIStatusError: Could not synthesize (status_code=-1, request_id=None, body=None, retryable=True)
. Removed the language and it solved.
🙌 1