Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when agent disconnects #564

Open
egoldschmidt opened this issue Aug 1, 2024 · 1 comment
Open

Error when agent disconnects #564

egoldschmidt opened this issue Aug 1, 2024 · 1 comment
Assignees

Comments

@egoldschmidt
Copy link
Contributor

When the agent disconnects after finishing its audio, I see this error (I don't believe it causes any issues but I'm not quite sure).

FWIW here's how I disconnect (advice welcome if this is not the right way to do this):

        await voice_assistant.aclose()
        await ctx.room.disconnect()

Error:

Error in _playout_task
Traceback (most recent call last):
  File "/home/appuser/.venv/lib/python3.12/site-packages/livekit/agents/utils/log.py", line 16, in async_fn_logs
    return await fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/appuser/.venv/lib/python3.12/site-packages/livekit/agents/voice_assistant/cancellable_source.py", line 158, in _playout_task
    await handle._tr_fwd.aclose()
  File "/home/appuser/.venv/lib/python3.12/site-packages/livekit/agents/transcription/tts_forwarder.py", line 208, in aclose
    await self._main_atask
  File "/home/appuser/.venv/lib/python3.12/site-packages/ddtrace/contrib/asyncio/patch.py", line 50, in traced_coro
    return await coro
           ^^^^^^^^^^
  File "/home/appuser/.venv/lib/python3.12/site-packages/livekit/agents/utils/log.py", line 16, in async_fn_logs
    return await fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/appuser/.venv/lib/python3.12/site-packages/livekit/agents/transcription/tts_forwarder.py", line 250, in _main_task
    await forward_task
  File "/home/appuser/.venv/lib/python3.12/site-packages/ddtrace/contrib/asyncio/patch.py", line 50, in traced_coro
    return await coro
           ^^^^^^^^^^
  File "/home/appuser/.venv/lib/python3.12/site-packages/livekit/agents/utils/log.py", line 16, in async_fn_logs
    return await fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/appuser/.venv/lib/python3.12/site-packages/livekit/agents/transcription/tts_forwarder.py", line 227, in _forward_task
    await self._opts.room.local_participant.publish_transcription(tr)
  File "/home/appuser/.venv/lib/python3.12/site-packages/livekit/rtc/participant.py", line 160, in publish_transcription
    raise PublishTranscriptionError(cb.publish_transcription.error)
livekit.rtc.participant.PublishTranscriptionError: failed to send transcription, room closed: channel closed
@theomonnom
Copy link
Member

Hey, this is indeed harmless. I will take a look at ignoring these errors when the room is closed

@nbsp nbsp self-assigned this Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants