agents
agents copied to clipboard
EOU prediction timeouts since upgrading to latest MultilingualModel
Bug Description
Recently upgraded from EnglishModel() to MultilingualModel() after reading the new blog about better turn detection model, then those errors started happening, as it was never happening before.
We're using standard vad here.
Error predicting end of turn
Traceback (most recent call last):
File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
return await fut
^^^^^^^^^
File "/home/appuser/.venv/lib/python3.12/site-packages/livekit/agents/ipc/job_proc_lazy_main.py", line 140, in do_inference
inf_resp = await fut
^^^^^^^^^
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/appuser/.venv/lib/python3.12/site-packages/livekit/agents/voice/audio_recognition.py", line 535, in _bounce_eou_task
end_of_turn_probability = await turn_detector.predict_end_of_turn(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/appuser/.venv/lib/python3.12/site-packages/livekit/plugins/turn_detector/multilingual.py", line 70, in predict_end_of_turn
return await super().predict_end_of_turn(chat_ctx, timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/appuser/.venv/lib/python3.12/site-packages/livekit/plugins/turn_detector/base.py", line 288, in predict_end_of_turn
result = await asyncio.wait_for(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/tasks.py", line 519, in wait_for
async with timeouts.timeout(timeout):
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/timeouts.py", line 115, in __aexit__
raise TimeoutError from exc_val
TimeoutError
Expected Behavior
Error properly handled or not thrown
Reproduction Steps
Upgrade to latest livekit, use MultilingualModel() for turn detection.
Operating System
Linux
Models Used
No response
Package Versions
livekit-agent=1.3.6
livekit-plugins-turn-detector=1.3.6
Session/Room/Call IDs
No response
Proposed Solution
Additional Context
No response
Screenshots and Recordings
No response