Option to start a reply on time when caller noise began while the agent was thinking (1.6.6 behavior)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 40/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- ai, audio-video-rtc
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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_taskbegan withaudio_output.resume(), so the reply played as soon as its audio was ready. - 1.8.x:
_reconcile_playout_pausekeeps 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 plusmin_silence_duration. A sound of 0.5 s or more also counts as an interruption, so the reply then waits forfalse_interruption_timeouttoo.
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_pauseto callaudio_output.resume()unconditionally, matching 1.6.6, and pin its source in a test so upgrades surface changes. - Setting
false_interruption_timeout=Noneremoves 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.
- 主要言語
- Python
- スター
- 14.6k
- フォーク
- 3.9k
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 166
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
livekit/agents のほかの issue
-
Agent state stays "speaking" after a realtime reply in sessions without audio output対応中かも @Luke-salinero が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Assistant markup is stripped from chat history when expressive mode is off対応中かも @ShivamSharma43 が 9 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
docs: openai.LLM vs openai.responses.LLM for HTTP OpenAI-compat hosts再び着手できるかも @AbarnaaSree が 49 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
livekit/agents#7022 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Google LLM plugin leaves Gemini thinking tokens out of completion_tokens対応中かも @ninglinLiu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ok-oldking/ok-wuthering-waves#1785 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
healthchecks/healthchecks#1349 ·
-
deployment release-lag
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
nolte/kamerplanter#2374 ·
メンテナーはふだん 1 日以内に返信
-
bug v1 v2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
modelcontextprotocol/python-sdk#3725 ·
メンテナーはふだん 1 日以内に返信
-
batchterms() drops queries without a similar() clause, misaligning results with inputs対応中かも @MohammadHijjawi97 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信