Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

STT FallbackAdapter can't detect a stream that stays connected but stops transcribing

Aperta
#7,693 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
22/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

The payload names no files, only the candidate homes for the check: stt.FallbackAdapter, StreamAdapter, and AgentActivity, which holds both the VAD and the STT. Read how FallbackAdapter already turns errors into retries and fallback, and how #5648 handled a silently hanging TTS socket. The maintainers have not chosen a location, so the first step is to ask which one they prefer before writing code. Done means an opt-in liveness check that raises a retryable APIConnectionError after speech goes unanswered, and that ignores speech heard while the agent is talking.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Feature Type

Would make my life easier

Feature Description

A streaming STT can keep its WebSocket open and stop returning any events while audio still flows. We saw this with Gnani (livekit-agents 1.8.2): no events for 60 s while 16 kHz audio kept flowing, until the provider closed the session itself ("no speech segment received for 60 seconds"). The first words after the reconnect were transcribed at once. stt.FallbackAdapter only reacts to errors and timeouts, so the user is effectively muted for the whole time.

Proposal: an opt-in liveness check. When the session's VAD detects speech of at least min_speech and the STT emits no event during it or within timeout after it ends, treat the stream as failed (a retryable APIConnectionError). Retry and fallback then work as today. Optionally, replay the buffered audio of that speech into the new stream, so the words are not lost.

It could live in FallbackAdapter, StreamAdapter, or AgentActivity, which already holds both the VAD and the STT. Speech the VAD hears while the agent is talking should not count, since on a speaker line it can be the agent's own voice.

Happy to open a PR if you'd take it. Which place would you prefer?

Workarounds / Alternatives

We currently wrap each STT plugin in our own stt.STT subclass. Its stream watches the session VAD's events (through a VAD wrapper) and raises a retryable APIConnectionError when speech goes unanswered, then replays the buffered audio into the reopened stream. It works, but it duplicates retry plumbing that belongs in the framework.

Additional Context
  • The timeline from one call: last final at T; 60 s of steady audio frames and no STT event of any kind; provider closes the session (status 500, retryable); LiveKit reconnects; the next speech is transcribed within a second.
  • A related case that was handled: #5648 (a TTS WebSocket hanging silently).
Lingua principale
Python
Stelle
14.6k
Fork
3.9k
Merge medio
2g 6h
PR unite (30g)
153

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di livekit/agents

Tutte le issue di livekit/agents

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.