agents icon indicating copy to clipboard operation
agents copied to clipboard

CancelledError with Deepgram plugin when updating options (language specifically)

Open vvv-001 opened this issue 9 months ago • 0 comments

Hi,

I have implemented the approach from this specific example in our own agent: https://github.com/livekit-examples/python-agents-examples/blob/main/pipeline-tts/elevenlabs_change_language.py

When switching for the first time it happens correctly, but the second time and the times after that continuously raise the following error and switching doesn't work anymore:

2025-04-24 14:47:13,993 - ERROR asyncio - _GatheringFuture exception was never retrieved
future: <_GatheringFuture finished exception=CancelledError()>
Traceback (most recent call last):
  File "/Users/vv/vv/vv.voice.agent/venv/lib/python3.12/site-packages/livekit/agents/utils/log.py", line 16, in async_fn_logs
    return await fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/vv/v/vv.voice.agent/venv/lib/python3.12/site-packages/livekit/plugins/deepgram/stt.py", line 495, in send_task
    async for data in self._input_ch:
  File "/Users/vv/vv/vv.voice.agent/venv/lib/python3.12/site-packages/livekit/agents/utils/aio/channel.py", line 176, in __anext__
    return await self.recv()
           ^^^^^^^^^^^^^^^^^
  File "/Users/vv/vv/vv.voice.agent/venv/lib/python3.12/site-packages/livekit/agents/utils/aio/channel.py", line 106, in recv
    await g
asyncio.exceptions.CancelledError {"room": "call-room-_+32634566785_YysxxxxJSXmD", "user_id": "your user_id", "pid": 15843, "job_id": "AJ_AVrHexxxxAh"}

Agent and plugins are on version 1.0.16. From what I see, this is very much related to the Deepgram plugin. Could that be the case?

vvv-001 avatar Apr 24 '25 12:04 vvv-001