:bug: Since releasing v 1.2.8 (released for us on ...
# agents
r
🐛 Since releasing v 1.2.8 (released for us on the 3rd September) we have started seeing an increase in TTS errors. I think a bug has been introduced. All with failures
"livekit.agents._exceptions.APIStatusError: Could not synthesize (status_code=-1, request_id=None, body=None, retryable=True)"
and stacktrace of
Copy code
{"message": "failed to synthesize speech, retrying in 0.1s\nTraceback (most recent call last):\n  File \"/home/appuser/.local/lib/python3.13/site-packages/livekit/plugins/elevenlabs/tts.py\", line 420, in _run\n    await waiter\n  File \"/home/appuser/.local/lib/python3.13/site-packages/livekit/plugins/elevenlabs/tts.py\", line 641, in _recv_loop\n    timed_words, stream._text_buffer = _to_timed_words(\n                                       ~~~~~~~~~~~~~~~^\n        stream._text_buffer, stream._start_times_ms, stream._durations_ms\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    )\n    ^\n  File \"/home/appuser/.local/lib/python3.13/site-packages/livekit/plugins/elevenlabs/tts.py\", line 791, in _to_timed_words\n    _, start_indices, _ = zip(*words)\n    ^^^^^^^^^^^^^^^^^^^\nValueError: not enough values to unpack (expected 3, got 0)\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.13/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.13/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": 141850, "job_id": "AJ_HB2AriZqSL7N", "timestamp": "2025-09-10T10:35:08.604392+00:00"}

2025-09-10 10:35:08,870 - livekit.agents - WARNING - failed to synthesize speech, retrying in 2.0s
This seems to be the cause. https://github.com/livekit/agents/pull/3284/files (I might be wrong).
b
I encountered similar and reported here: https://github.com/livekit/agents/issues/3330. Should be fixed with next release.