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

Option to start a reply on time when caller noise began while the agent was thinking (1.6.6 behavior)

Aperta
#7,837 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à
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
40/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start in AgentActivity._reconcile_playout_pause, where the hold on a paused speech handle is decided, and in on_start_of_speech, which records the pause with agent_state. Then check generation._audio_forwarding_task to see where playback resumes. Done means a new InterruptionOptions flag that defaults to current behavior, and a test showing that with the flag off, a reply paused during thinking resumes at forwarding start. Confirm the design with maintainers before coding, since the issue proposes the setting but nobody has agreed to it.

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

Descrizione

Feature Type

Would make my life easier

Feature Description

An InterruptionOptions setting to start a reply's audio on time when caller noise began while the agent was thinking, as 1.6.6 did. For example hold_reply_while_user_speaking: bool = True; when false, _reconcile_playout_pause would resume at forwarding start.

What changed (1.6.6 → 1.8.6, unchanged in 1.8.7 and 2.0.0b1)

When VAD start-of-speech arrives while the agent is thinking, on_start_of_speech pauses the current speech handle. That is the same in both versions.

  • 1.6.6: generation._audio_forwarding_task began with audio_output.resume(), so the reply played as soon as its audio was ready.
  • 1.8.x: _reconcile_playout_pause keeps that pause ("a paused playout stays paused regardless of forwarding status"). The reply waits for VAD end of speech, which is the sound's length plus min_silence_duration. A sound of 0.5 s or more also counts as an interruption, so the reply then waits for false_interruption_timeout too.

Impact (telephony, Deepgram Flux with turn_detection="stt", interruption mode "vad")

Scripted VAD and STT through a real AgentSession. LLM first token after 0.7 s. First audio at 2.48 s with no noise:

Caller sound near reply start 1.6.6 first audio 1.8.6 first audio
none 2.48 s 2.48 s
0.1–0.3 s 2.48 s 3.05–3.25 s
0.6 s 2.48 s 5.35 s

On phone lines, breaths, line noise and short "mm" sounds near reply start are common. Each adds 0.6 s or more of dead air before the agent answers.

Workarounds / Alternatives
  • We currently monkeypatch AgentActivity._reconcile_playout_pause to call audio_output.resume() unconditionally, matching 1.6.6, and pin its source in a test so upgrades surface changes.
  • Setting false_interruption_timeout=None removes the hold, but also turns off resuming after a false interruption mid-reply, which we want to keep.
  • Making VAD less sensitive also changes endpointing and interruptions.
Additional Context

The setting could apply only to pauses recorded while the agent was thinking (_PausedSpeechInfo.agent_state == "thinking"). Interruptions during playback would keep today's behavior.

Lingua principale
Python
Stelle
14.6k
Fork
3.9k
Merge medio
3g 3h
PR unite (30g)
171

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.