Skip to content

Livekit does not react to user speech when turn_detection set to "stt" in the Google plugin for certain models #3706

@mrkowalski

Description

@mrkowalski

livekit-agents==1.2.15 never reacts to user speech for the following Google plugin STT configuration:

google.STT(
  languages="pl-PL",
  detect_language=False,
  model="latest_long",
  location="eu",
  use_streaming=True,
  punctuate=False,
  interim_results=False,
)

and AgentSession(turn_detection="stt" ...

It works ok on 1.2.14 or when turn_detection is unset.

I see the difference in debugger caused by this PR: #3559 :

Lines 351-353 are not executed in 1.2.15:

if not self._speaking:
  chat_ctx = self._hooks.retrieve_chat_ctx().copy()
  self._run_eou_detection(chat_ctx)

In current code, there exists a code path for the FINAL_TRANSCRIPT event handler for which nothing happens: When _vad_base_turn_detection is False and _user_turn_committed is False.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions