Traceback (most recent call last): File "/app/ve...
# ask-ai
r
Traceback (most recent call last): File "/app/venv/lib/python3.13/site-packages/opentelemetry/util/_decorator.py", line 71, in async_wrapper return await func(*args, **kwargs) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/venv/lib/python3.13/site-packages/livekit/agents/ipc/job_proc_lazy_main.py", line 286, in _traceable_entrypoint await self._job_entrypoint_fnc(job_ctx) File "/app/main.py", line 58, in entrypoint await InboundAssistant(ctx).dispatch() File "/app/call/inbound.py", line 378, in dispatch await session.start( ...<3 lines>... ) File "/app/venv/lib/python3.13/site-packages/livekit/agents/voice/agent_session.py", line 545, in start room_options = room_io.RoomOptions._ensure_options( room_options, room_input_options=room_input_options, room_output_options=room_output_options, ) File "/app/venv/lib/python3.13/site-packages/livekit/agents/voice/room_io/types.py", line 167, in _ensure_options return cls._create_from_legacy(room_input_options, room_output_options) ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/venv/lib/python3.13/site-packages/livekit/agents/voice/room_io/types.py", line 186, in _create_from_legacy if input_options.text_enabled is not False ^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'RoomOptions' object has no attribute 'text_enabled'
t
Thanks for reaching out, Rithvik. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I see the traceback and you're hitting an AttributeError when code expects a
text_enabled
attribute on
RoomOptions
. This happens because
RoomOptions
uses
text_input
(boolean or
TextInputOptions
) to control text input, not
text_enabled
. Replace any
text_enabled
usage with
text_input
. Example fix:
Copy code
from livekit.agents.voice import room_io

await session.start(
    agent=MyAgent(),
    room=ctx.room,
    room_options=room_io.RoomOptions(
        text_input=True
    )
)
If you still get errors after that, please tell me: • the LiveKit Agents package version (
pip show livekit-agents
), and • the snippet where you construct
RoomOptions
(or paste the relevant lines). Sources: Agent session | LiveKit docs
r
if runtime_settings.noise_cancellation_type == NoiseCancellationType.BVC_TELEPHONY: room_input_options = RoomOptions( _audio_input_=AudioInputOptions( _noise_cancellation_=noise_cancellation.BVCTelephony(), ), ) elif runtime_settings.noise_cancellation_type == NoiseCancellationType.BVC: room_input_options = RoomOptions( _audio_input_=AudioInputOptions( _noise_cancellation_=noise_cancellation.BVC(), ) )
This is my code
t
Thanks — I reviewed your RoomOptions snippet and the traceback. It looks like code expecting a RoomInputOptions (which has text settings) is instead receiving a
RoomOptions
instance, and that leads to the AttributeError for
text_enabled
. To diagnose quickly, please paste these exact items: 1. The full
session.start(...)
call you use (all keyword args:
room_options=...
,
room_input_options=...
,
room_output_options=...
). 2. The exact lines where you create
RoomOptions
/
AudioInputOptions
(the constructor calls/imports). 3. Your
livekit-agents
package version (
pip show livekit-agents
). 4. Any lines you elided from the traceback (the 3 lines you replaced with
<3 lines>
). 5. What you want the final behavior to be (e.g., audio noise cancellation enabled, text input off). If you want, I can propose the corrected code once you share the
session.start
call and the RoomOptions construction. Sources: Text and transcriptions | LiveKit docs | Agent session | LiveKit docs