Turn Detector Error: "Turn detector does not support language english"

The MultilingualModel turn detector reports it doesn’t support language “english” even though the STT provider is configured with language=“en”.

Environment & Versions

  • Python: 3.12 (or 3.11+ as minimum requirement)
  • livekit-agents: ^1.4
  • livekit-plugins-openai: ^1.4
  • livekit-plugins-turn-detector: ^1.4
  • livekit-api: ^1.1
  • STT Provider: OpenAI Whisper (whisper-1)
  • Turn Detector: MultilingualModel() (no parameters)

Error Logs -

2026-02-17 05:12:02.448 | INFO | logging | callHandlers:1762 | STT metrics
{
    "message": "STT metrics",
    "level": "INFO",
    "name": "livekit.agents",
    "model_name": "whisper-1",
    "model_provider": "api.openai.com",
    "audio_duration": 5.56,
    "session_id": "AJ_P6zq2755rWKK",
    "round_id": "7fd76d6e-3a30-4eb8-8a3c-385ae385d00e",
    "account_id": "90f046d7-4abf-4830-a512-d94801db3bf2",
    "pid": 500,
    "job_id": "AJ_P6zq2755rWKK",
    "room_id": "RM_tSFbsDYGHRQu",
    "timestamp": "2026-02-17T05:12:02.447572+00:00"
}

2026-02-17 05:12:02.448 | INFO | logging | callHandlers:1762 | Turn detector does not support language english
{
    "message": "Turn detector does not support language english",
    "level": "INFO",
    "name": "livekit.agents",
    "session_id": "AJ_P6zq2755rWKK",
    "round_id": "7fd76d6e-3a30-4eb8-8a3c-385ae385d00e",
    "account_id": "90f046d7-4abf-4830-a512-d94801db3bf2",
    "pid": 500,
    "job_id": "AJ_P6zq2755rWKK",
    "room_id": "RM_tSFbsDYGHRQu",
    "timestamp": "2026-02-17T05:12:02.448677+00:00"
}

Relevant Code

STT Provider Configuration:

def _setup_stt_providers(self) -> List[Any]:
    """Set up STT providers with fallback mechanism"""
    stt_providers = []

    # Primary STT provider: OpenAI Whisper
    if settings.OPENAI_API_KEY:
        stt_providers.append(
            openai.STT(
                api_key=settings.OPENAI_API_KEY,
                language="en",  # ISO 639-1 code
                model=DEFAULT_STT_MODEL,  # "whisper-1"
            )
        )
        logger.info("OpenAI STT configured as primary provider")

    # Fallback STT provider: Deepgram (if available and configured)
    if settings.DEEPGRAM_API_KEY:
        stt_providers.append(
            deepgram.STT(
                api_key=settings.DEEPGRAM_API_KEY, 
                model="nova-2", 
                language="en"  # ISO 639-1 code
            )
        )
        logger.info("Deepgram STT configured as fallback provider")

    return stt_providers

AgentSession Configuration:

from livekit.plugins.turn_detector.multilingual import MultilingualModel
from livekit.agents.voice import AgentSession

# ... STT setup code above ...

# Create agent session with the selected TTS, STT, and LLM
self.session = AgentSession[InterviewData](
    userdata=self.interview_data,
    stt=stt_instance,  # OpenAI STT with language="en"
    llm=llm_instance,
    tts=tts_instance,
    vad=self.vad,
    turn_detection=MultilingualModel(),  # No language parameter
    min_endpointing_delay=2.0,
    max_endpointing_delay=3.0,
    max_tool_steps=10,
)

I’m not sure what’s causing this issue. Any help would be appreciated!

The issue is that the MultilingualModel turn detector is receiving the language code "english" (the full language name) instead of the expected ISO 639-1 code "en" (the two-letter code).

The way i see it. The turn detector infers the language info from STT. So, isn’t this a livekit issue where the wrong language format is being passed?

How are you defining your fallback adapter? I mean, what do you do with the return value of _setup_stt_providers?

Putting the relevant code here -

async def start(self) -> None:
    """Start the interview session"""
    logger.info("Starting interview session")

    # Validate settings
    validate_required_settings()

    # Ensure interview data is initialized
    if not self.interview_data or not self.vad:
        raise ModuleError(
            "livekit_agent.interview.voice.session",
            "Interview session not properly initialized. Call initialize() first.",
        )

    # Get voice settings from the interview data
    voice_settings = self.interview_data.interview_data.get("voice_settings", {})

    # Set up providers with fallback mechanisms
    tts_providers = self._setup_tts_providers(voice_settings)
    stt_providers = self._setup_stt_providers()
    llm_providers = self._setup_llm_providers()

    # Create provider instances with fallback support
    tts_instance = self._create_provider_instance(tts_providers, "TTS")
    stt_instance = self._create_provider_instance(stt_providers, "STT")
    llm_instance = self._create_provider_instance(llm_providers, "LLM")

    # Create agent session with the selected TTS, STT, and LLM
    self.session = AgentSession[InterviewData](
        userdata=self.interview_data,
        stt=stt_instance,
        llm=llm_instance,
        tts=tts_instance,
        vad=self.vad,
        turn_detection=MultilingualModel(),
        min_endpointing_delay=2.0,
        max_endpointing_delay=3.0,
        max_tool_steps=10,
    )


def _setup_stt_providers(self) -> List[Any]:
    """Set up STT providers with fallback mechanism

    Returns:
        List of configured STT providers
    """
    stt_providers = []

    # Primary STT provider: OpenAI Whisper
    if settings.OPENAI_API_KEY:
        stt_providers.append(
            openai.STT(
                api_key=settings.OPENAI_API_KEY,
                language="en",
                model=DEFAULT_STT_MODEL,
            )
        )
        logger.info("OpenAI STT configured as primary provider")

    # Fallback STT provider: Deepgram (if available and configured)
    if settings.DEEPGRAM_API_KEY:
        stt_providers.append(
            deepgram.STT(
                api_key=settings.DEEPGRAM_API_KEY, model="nova-2", language="en"
            )
        )
        logger.info("Deepgram STT configured as fallback provider")
    elif not settings.DEEPGRAM_API_KEY:
        logger.warning(
            "Deepgram API key not configured - STT fallback limited to OpenAI only"
        )

    return stt_providers


def _create_provider_instance(
    self, providers: List[Any], provider_type: str
) -> Any:
    """Create a provider instance with fallback support

    Args:
        providers: List of configured providers
        provider_type: Type of provider (TTS, STT, LLM) for logging

    Returns:
        Provider instance with fallback if multiple providers available

    Raises:
        ModuleError: If no providers are configured
    """
    if len(providers) > 1:
        if provider_type == "STT":
            if not self.vad:
                raise ModuleError(
                    "livekit_agent.interview.voice.session",
                    "VAD must be initialized before creating STT provider instances",
                )

            wrapped_providers = [
                stt.StreamAdapter(stt=provider, vad=self.vad)
                for provider in providers
            ]
            instance = stt.FallbackAdapter(cast(list[stt.STT], wrapped_providers))
        elif provider_type == "TTS":
            instance = tts.FallbackAdapter(providers)
        else:  # LLM
            instance = llm.FallbackAdapter(providers)
        logger.info(
            f"{provider_type} fallback enabled with {len(providers)} providers"
        )
        return instance
    elif len(providers) == 1:
        logger.warning(
            f"{provider_type} fallback not available - only one provider configured"
        )
        if provider_type == "STT":
            if not self.vad:
                raise ModuleError(
                    "livekit_agent.interview.voice.session",
                    "VAD must be initialized before creating STT provider instance",
                )

            return stt.StreamAdapter(stt=providers[0], vad=self.vad)
        return providers[0]
    else:
        raise ModuleError(
            "livekit_agent.interview.voice.session",
            f"No {provider_type} providers configured",
        )

So,

_setup_stt_providers():

  • Creates raw STT provider instances (OpenAI, Deepgram)
  • Configures each with language=“en” and API keys
  • Returns a list of provider instances: [openai.STT(language=“en”), deepgram.STT(language=“en”)]

_create_provider_instance():

  • Takes the list of providers and wraps them for use

  • For STT specifically:
    If multiple providers: wraps each in stt.StreamAdapter (adds VAD), then wraps all in stt.FallbackAdapter
    If single provider: wraps only in stt.StreamAdapter

Thanks for the detailed code, it really helps.

It looks like this issue is specific to OpenAI’s ‘whisper-1’ model. If I change this to ‘gpt-4o-transcribe’ the issue goes away.

AI is saying the root cause is this line: agents/livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/stt.py at main · livekit/agents · GitHub, which causes the plugin to report its language as “english” rather than “en”, but I’m unsure why a specific check is made in the codebase there.

I can also reproduce this with our starter agent, GitHub - livekit-examples/agent-starter-python: A complete voice AI starter for LiveKit Agents with Python., and making a single change: stt=openai.STT(model="whisper-1"),

Is the whisper-1 model a hard requirement? If not, I suggest using a different model.

Let me follow up with the team to see if this is a known issue

Thanks for checking this out!
I ended up moving to a different STT, so I’m good now.

thanks again!