STT turn detection: Google STT without word offsets (chirp_3) reports `end_time = start_time_offset`, which freezes the end-of-speech anchor, disables `min_delay` and drops turn metrics
Los mantenedores suelen responder en 1 día
Ya se ha fusionado un pull request relacionado.
- #7687 de @15054538509 — fusionado
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 18/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- google-cloud, python
- Área
- audio-video-rtc
Línea de trabajo
Start in the plugin's stt.py around lines 1172-1181, where a result with text but no word offsets returns start_time_offset as end_time, then read voice/audio_recognition.py around lines 1198-1218 and 1256-1257 where that value overrides the VAD anchor. Pull request #7687 is already open against this issue, so check it before starting. Done means min_delay applies again and the turn metrics are present for chirp_3 without word offsets.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
With turn_detection="stt" and the Google plugin on chirp_3, every final transcript carries an end_time that is not the end of speech: it is the stream's start_time_offset. Since 1.8.0 (#6557) STT turn detection trusts any end_time > 0 as the provider's speech end and overwrites the VAD anchor with it. The result is that the user's "stopped speaking" time sits at the moment the STT stream opened, for every turn of the session.
Where
livekit-plugins-googlestt.py(1.8.4 / 1.8.5, lines 1172-1181): when a result has text but no words — always the case onchirp_3, which forcesenable_word_time_offsets=False(lines 230-235) — it returnsSpeechData(start_time=start_time_offset, end_time=start_time_offset, ...).livekit-agents1.8.5voice/audio_recognition.py:- lines 1198-1202:
has_stt_end_timeis true for anyend_time > 0; - lines 1214-1218: in
"stt"mode that is enough foruse_stt_speaking_time, even when a VAD anchor exists; - lines 1256-1257:
_last_speaking_timeis overwritten on everyFINAL_TRANSCRIPT.
- lines 1198-1202:
start_time_offset is small but positive (the stream opens a few ms after the input starts), so the check passes.
Effects
min_delaynever applies.extra_sleep = endpointing_delay + last_speaking_time - time.time()(lines 1730-1732) is negative by however long the session has been running, so endpointing never waits.- Turn metrics disappear.
last_speaking_time < speech_start_timetrips the stale-anchor guard (around line 109), so the user message gets nostopped_speaking_at,end_of_turn_delayortranscription_delay, and the assistant message gets noe2e_latency.
In 1.6.2 the same plugin output was harmless: the provider time replaced the anchor only when there was no VAD (or the VAD missed the segment).
Reproduction
livekit-agents1.8.5,livekit-plugins-google1.8.4,google.STT(model="chirp_3", enable_voice_activity_events=True), a VAD (inference.VAD),turn_detection="stt", SIP caller.- Five turns in one call: the DEBUG line
user turn committedshows the samelast_speaking_timeon all five (the session's start), earlier than each turn'sspeech_start_time. - No
e2e_latencyon any assistant message. On 1.6.2, same setup, every turn has it.
Suggested fix (either)
- Plugin: when there are no word offsets, leave
start_time/end_timeat 0 rather than the stream offset, so the SDK knows it has no provider timing. - SDK: in STT mode, accept the provider time only when it is plausible (
end_time + input_started_at >= speech_start_timeof the current turn); otherwise keep the VAD anchor.
- Lenguaje dominante
- Python
- Estrellas
- 14.6k
- Forks
- 3.9k
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 207
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 19 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
livekit/agents#7647 · 1 comentario ·
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 59 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
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de livekit/agents
Issues similares
-
backlog
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
EchoTools/nevr-runtime#1108 ·
Los mantenedores suelen responder en 1 día
-
parse names a key after a top-level multi() threshold Bitcoin Core v31.1 refuses as not validAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
btclib-org/btclib-wallet#587 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Judgment-Pack/judgment-pack-spec#275 ·
Los mantenedores suelen responder en 1 día