livekit / agents

Build real-time multimodal AI applications 🤖🎙️📹
https://docs.livekit.io/agents
Apache License 2.0
4.07k stars 427 forks source link

agent_playout.py giving exception. #863

Open Test-isom opened 1 month ago

Test-isom commented 1 month ago

{"message": "Error in _capture_task\nTraceback (most recent call last):\n File \"/root/pythonenv/enve/lib/python3.10/site-packages/livekit/agents/utils/log.py\", line 16, in async_fn_logs\n return await fn(*args, **kwargs)\n File \"/root/pythonenv/enve/lib/python3.10/site-packages/livekit/agents/pipeline/agent_playout.py\", line 148, in _capture_task\n await self._audio_source.capture_frame(frame)\n File \"/root/pythonenv/enve/lib/python3.10/site-packages/livekit/rtc/audio_source.py\", line 149, in capture_frame\n raise Exception(cb.capture_audio_frame.error)\nException: an RtcError occured: InvalidState - failed to capture frame", "level": "ERROR", "name": "livekit.agents.pipeline", "pid": 68609, "job_id": "AJ_qpzYH4X5TDFx", "timestamp": "2024-10-08T12:51:10.613224+00:00"}

theomonnom commented 1 month ago

Hey, do you have more details on how to reproduce this issue?

Test-isom commented 1 month ago

Didn't faced this issue with openai LLm, but facing this when i use llama model with together ai very often.

Test-isom commented 1 month ago

hi @theomonnom this error coming alot more frequently now, when this happens agent stops replying and if i ask "are you there", than it replies after few seconds with "yes iam here".Iam using gpt-4o model, openai for TTS and deepgram for STT.

eugene-wq commented 2 weeks ago

Same issue here, seems random, hard to recreate. I use Fireworks LLM, Deepgram STT and elvenlabs TTS. Would be glad for any advices!

theomonnom commented 2 weeks ago

Can you send me the output of pip freeze | grep livekit

To get the used versions

eugene-wq commented 2 weeks ago

livekit==0.18.0
livekit-agents==0.11.1
livekit-api==0.7.1
livekit-plugins-cartesia==0.4.3
livekit-plugins-deepgram==0.6.9
livekit-plugins-elevenlabs==0.7.7
livekit-plugins-openai==0.10.5
livekit-plugins-silero==0.7.3
livekit-protocol==0.6.0