livekit/python-sdks

ImportError: cannot import name 'codecs'

parshvadaftari opened this issue · 0 comments

When I run the minimal_assistant.py, this was the error that showed up.
ImportError: cannot import name 'codecs' from 'livekit.agents' (/Users/parshva/SoftmaxAI/Projects/.conda/lib/python3.10/site-packages/livekit/agents/init.py)

It's a package issue, where instead of
-> from livekit.agents import codecs, tts, utils

it should be:
-> from livekit.agents.utils import codecs
-> from livekit.agents import tts, utils

Doing this changes in my local stt.py and tts.py helped me to run the file. I suggest to update the pypi package as the 'codecs' is in "livkit.agents.utils" and not in "livekit.agents"