DynamicEndpointing: one long silence between user utterances inflates min_delay for the rest of the session
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- audio-video-rtc, backend
Línea de trabajo
Start with voice/endpointing.py and inspect DynamicEndpointing.on_end_of_speech, especially the between-utterance pause update. Add coverage for a pause longer than max_delay and confirm it does not raise the learned min_delay; retain the existing behavior for shorter pauses. An open pull request (#7750) is already linked.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Environment
- livekit-agents 1.8.5 (
voice/endpointing.pyis identical in 1.8.6 and onmain) turn_handling={"endpointing": {"mode": "dynamic", "min_delay": 0.3, "max_delay": 2.5}}(alpha 0.9)
What happens
DynamicEndpointing learns min_delay from the pause between two user utterances with no agent speech in between. That pause goes into ExpFilter.apply() unbounded, and only the filtered result is clamped to max_delay. One long silence, such as a user waiting for a reply that never came because STT dropped a short "yes", lifts the learned floor far above anything a mid-turn pause would justify. Every later turn of the session then waits that long before committing.
Repro
from livekit.agents.voice.endpointing import DynamicEndpointing
ep = DynamicEndpointing(min_delay=0.3, max_delay=2.5, alpha=0.9)
ep.on_start_of_speech(0.0)
ep.on_end_of_speech(0.3) # a short "yes" that STT drops: no reply follows
ep.on_start_of_speech(15.5) # the user speaks again after 15.2 s of silence
ep.on_end_of_speech(16.7)
assert ep.min_delay <= 1.0, ep.min_delay # AssertionError: 1.79 (0.9*0.3 + 0.1*15.2)
On a real phone call this produced exactly that: end_of_utterance_delay went from 0.52 s to 1.79 s and stayed between 1.67 s and 2.13 s for the rest of the call (18 turns). Replaying the user/agent state events of 84 recorded sessions through DynamicEndpointing gave 51 of 624 user turns committed on a floor above 1 s, across 6 sessions, all of them phone calls.
Proposed fix
min_delay exists to cover pauses inside a user's turn. A pause longer than max_delay can never be covered, because the floor is clamped to max_delay. Learning from such a pause only adds latency. In the "pause between utterances" branch of on_end_of_speech, skip the update when pause > self.max_delay:
if (
(pause := self.between_utterance_delay) > 0
and pause <= self.max_delay
and self._agent_speech_ended_at is None
and self._agent_speech_started_at is None
):
Clamping the sample to max_delay instead still moves the floor by (1 - alpha) * max_delay (0.22 s) per long silence. Over the same 84 sessions the highest floor was 0.94 s with clamping and 0.62 s with the skip.
We currently ship this as a subclass injected through agent_activity.create_endpointing. We would be glad to drop it once this is fixed upstream, and can open a PR if that helps.
- Lenguaje dominante
- Python
- Estrellas
- 14.6k
- Forks
- 3.9k
- Merge medio
- 2 d 23 h
- PR fusionados (30 d)
- 177
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de livekit/agents
-
Assistant markup is stripped from chat history when expressive mode is offPosiblemente ocupada @ShivamSharma43 la tomó hace 6 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
docs: openai.LLM vs openai.responses.LLM for HTTP OpenAI-compat hostsQuizá libre de nuevo @AbarnaaSree la tomó hace 45 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
livekit/agents#7022 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Tool argument errors put the argument values in the log message body, outside `lk.pii.*`Posiblemente ocupada @Li-john1021 la tomó hoy. Abierto
Dificultad 3/5 Medio día Aptitud para principiantes 25/100
livekit/agents#7801 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Google Realtime (Vertex AI): update_instructions() appends a model turn instead of replacing the system instructionPosiblemente ocupada @Li-john1021 la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
livekit/agents#7785 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
elevenlabs: text-to-dialogue (v3/v4) alignment timestamps are chunk-relative, breaking synced transcriptsPosiblemente ocupada @satheeshk50 la tomó hoy. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
livekit/agents#7773 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de livekit/agents
Issues similares
-
[Bug]: LangGraph Store sync put bypasses namespace validationPosiblemente ocupada @ktz03 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
volcengine/OpenViking#6050 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Streamed /v1/chat/completions sends unredacted agent error text (keys) in the final chunkPosiblemente ocupada @rodricksz4h5 la tomó hoy. Abiertoarea/streaming comp/gateway P2 type/security
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
NousResearch/hermes-agent#138245 ·
Los mantenedores suelen responder en 1 día
-
[oblt-aw][autodoc] Update user onboarding guide for mandatory trigger CODEOWNERS stepPosiblemente ocupada @github-actions la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
correction metadata
Dificultad 2/5 Menos de una hora Aptitud para principiantes 68/100
acl-org/acl-anthology#10378 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
cloudtrail_multi_region_enabled_logging_management_events fails when the advanced event selector has a custom namePosiblemente ocupada @12YYCCYY16 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
prowler-cloud/prowler#13033 ·
Los mantenedores suelen responder en 1 día