Livekit error: "Unrecognized model in livekit/turn-detector"

dkorman
PRO

2 months ago

Hi folks. I'm trying to deploy a VoicePipelineAgent on Railway.

This agents works locally, and was working on Railway several weeks ago as well on the initial deployment. However, I needed to create a fresh instance and now I'm getting the "Unrecognized model in livekit/turn-detector" issue below (I haven't changed requirements or the dockerfile in the meanwhile). I'm on Windows 10 for local dev.

File "/app/agent_bab.py", line 786, in <module>
cli.run_app(
raise ValueError(
File "/usr/local/lib/python3.12/site-packages/livekit/agents/cli/cli.py", line 184, in download_files plugin.download_files()
File "/usr/local/lib/python3.12/site packages/livekit/plugins/turn_detector/__init__.py", line 34, in download_files
AutoTokenizer.from_pretrained(HG_MODEL, revision=MODEL_REVISION)
File "/usr/local/lib/python3.12/site-packages/transformers/models/auto/tokenization_auto.py", line 966, in from_pretrained
config = AutoConfig.from_pretrained(
ValueError: Unrecognized model in livekit/turn-detector. Should have a model_type key in its config.json, or contain one of the following strings in its name: albert, align, altclip,...

... File "/usr/local/lib/python3.12/site-packages/transformers/models/auto/configuration_auto.py", line 1151, in from_pretrained

This is my dockerfile:

ARG PYTHON_VERSION=3.12.9 FROM python:${PYTHON_VERSION}-slim as base # Prevents Python from writing pyc files. ENV PYTHONDONTWRITEBYTECODE=1 # Keeps Python from buffering stdout and stderr to avoid situations where # the application crashes without emitting any logs due to buffering. ENV PYTHONUNBUFFERED=1 WORKDIR /app # Create a non-privileged user that the app will run under. ARG UID=10001 RUN adduser \ --disabled-password \ --gecos "" \ --home "/nonexistent" \ --shell "/sbin/nologin" \ --no-create-home \ --uid "${UID}" \ appuser # Copy only requirements.txt first (allows better Docker caching) COPY requirements.txt . # Install dependencies RUN python -m pip install --no-cache-dir -r requirements.txt # Now copy the rest of the application source code COPY . . # Switch to the non-privileged user to run the application. USER appuser # Run the application. CMD ["sh", "-c", "python agent_bab.py download-files && python agent_bab.py start"]

This is my requirements.txt:

livekit==0.20.0

livekit-agents==0.12.17

livekit-plugins-openai==0.10.18

livekit-plugins-cartesia==0.4.7

livekit-plugins-deepgram==0.6.18

livekit-plugins-silero==0.7.4

livekit-plugins-elevenlabs==0.8.0

livekit-plugins-turn-detector==0.4.1

livekit-plugins-assemblyai==0.2.3

python-dotenv==1.0.1

llama-index==0.12.17

geopy==2.4.1

torch==2.6.0

phonenumbers==9.0.0

transformers==4.51.3

huggingface-hub==0.30.2

ENV variables:
The only extra thing I needed on Railway was the environmental variable below to make the first/initial deployment work: HF_HOME="/tmp/huggingface"

Any help would be much appreciated, thanks!

Awaiting User Response

1 Replies

2 months ago

Hey!

I'm really sorry but this is an issue with your application or config. Unfortunately, we're unable to offer first-party support for issues unrelated to the Railway product or platform.

Other communities such as Stackoverflow might be able to help you out further.

Best,
Brody


Status changed to Awaiting User Response railway[bot] 2 months ago


Livekit error: "Unrecognized model in livekit/turn-detector" - Railway Help Station