Anyone getting this error from Cartesia TTS? ```20...
# agents
p
Anyone getting this error from Cartesia TTS?
Copy code
2025-10-02 01:22:49,730 - ERROR livekit.agents - Error in _tts_inference_task
Traceback (most recent call last):
  File "/Users/matteo/voice_booking/agent/venv/lib/python3.13/site-packages/livekit/agents/utils/log.py", line 16, in async_fn_logs
    return await fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/matteo/voice_booking/agent/venv/lib/python3.13/site-packages/opentelemetry/util/_decorator.py", line 71, in async_wrapper
    return await func(*args, **kwargs)  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/matteo/voice_booking/agent/venv/lib/python3.13/site-packages/livekit/agents/voice/generation.py", line 212, in _tts_inference_task
    async for audio_frame in tts_node:
    ...<3 lines>...
        audio_ch.send_nowait(audio_frame)
  File "/Users/matteo/voice_booking/agent/src/agents/base.py", line 984, in process_with_caching
    async for frame in parent_tts_node(self._text_to_async_iterable(tokens), model_settings):  # type: ignore
        collected_frames.append(frame)
        yield frame
  File "/Users/matteo/voice_booking/agent/venv/lib/python3.13/site-packages/livekit/agents/voice/agent.py", line 402, in tts_node
    async with wrapped_tts.stream(conn_options=conn_options) as stream:
               ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/matteo/voice_booking/agent/venv/lib/python3.13/site-packages/livekit/plugins/cartesia/tts.py", line 210, in stream
    return SynthesizeStream(
        tts=self,
        pool=self._pool,
        opts=self._opts,
    )
  File "/Users/matteo/voice_booking/agent/venv/lib/python3.13/site-packages/livekit/plugins/cartesia/tts.py", line 296, in __init__
    super().__init__(tts=tts)
    ~~~~~~~~~~~~~~~~^^^^^^^^^
TypeError: SynthesizeStream.__init__() missing 1 required keyword-only argument: 'conn_options' {"pid": 36454, "job_id": "AJ_riUQkYwsfevy"}
r
Looks like an error with your code
b
Might want to try updating the livekit version to the latest. As far as I can see in
.../livekit/plugins/cartesia/tts.py
the conn_options have a default value:
Copy code
def stream(
        self, *, conn_options: APIConnectOptions = DEFAULT_API_CONNECT_OPTIONS
    ) -> SynthesizeStream:
        return SynthesizeStream(tts=self, conn_options=conn_options)
So it shouldn't require it unless it was modified