Audio routing freeze mid-call (1.6.9)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 43/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
Start by tracing AudioRecognition audio routing and the STT stream lifecycle during multi-turn conversations, as identified in the issue. Compare what happens during successful turns with the freeze, especially around activity handoffs; the report confirms room audio frames continue arriving while STT/VAD receive none. Done means identifying and fixing the shared routing failure so user-state events and STT output continue across turns.
索引モデルが issue の本文から書いたものです。
説明
Description
Audio routing stops working mid-call. user_state stays stuck on "listening", no user_state_changed events are emitted, STT produces no output, and the call hangs up after inactivity prompts.
User continues speaking throughout (confirmed via separate audio stream subscription), but the audio doesn't reach STT/VAD/turn detection components.
Happens randomly during multi-turn conversations - not always on the same turn. Can't reproduce reliably but occurs frequently enough to block production deployment.
Expected vs Actual
Expected: Turn detection works every turn, user_state transitions normally, STT produces transcripts
Actual: Audio routing freezes, user_state stuck on "listening", no user_state_changed events, no STT output
Environment
- Version: livekit-agents 1.6.9, livekit 1.1.14
- Deployment: Self-hosted, outbound SIP
- Models: Deepgram nova-3 (STT), gpt-4.6-luna (LLM), Deepgram aura-2 (TTS)
Comprehensive Testing
Tested multiple configurations to isolate the issue. All configurations exhibit the same freeze behavior.
Configuration 1: Silero VAD + Turn Detector v1-mini
vad=inference.VAD(model="silero", min_speech_duration=0.05, min_silence_duration=0.25, activation_threshold=0.4)
turn_handling=TurnHandlingOptions(
turn_detection=inference.TurnDetector(version="v1-mini"),
endpointing={"min_delay": 0.5, "max_delay": 1},
interruption={"mode": "vad", "min_words": 3},
)
Result: Freezes mid-call
Configuration 2: No VAD + Turn Detector v1-mini
vad=None # Explicitly disabled
turn_handling=TurnHandlingOptions(
turn_detection=inference.TurnDetector(version="v1-mini"),
endpointing={"min_delay": 0.5, "max_delay": 1},
interruption={"mode": "vad", "min_words": 3},
)
Result: Freezes mid-call
Evidence: Logs confirm Session VAD: None
Configuration 3: No VAD + STT Endpointing
vad=None
turn_handling=TurnHandlingOptions(
turn_detection="stt", # Deepgram handles endpointing
endpointing={"min_delay": 0.5, "max_delay": 1},
interruption={"mode": "vad", "min_words": 3},
)
Result: Freezes mid-call
What This Proves
The bug is NOT caused by:
- Silero VAD specifically (tested with
vad=None) - Turn Detector v1-mini (tested with
turn_detection="stt") - Corrupted VAD/STT instance state (tested with fresh instances per turn)
- Network/SIP issues (confirmed audio frames arrive via separate subscription)
The bug appears to be a framework-level issue in:
- Audio routing in
AudioRecognition - Audio frame delivery to STT/VAD/turn detection components
- Affects all turn detection methods equally
Additional Testing and Workarounds (All Failed)
Configuration changes tested:
- Removed
allow_interruptions=Falsefrom allsession.say()/generate_reply()calls, replaced with temporary elevation ofinterruption.min_wordsthreshold - no change - Switched from deprecated
silero.VAD.load()toinference.VAD(model="silero")- no change - Switched from text-based
turn_detector.multilingual.MultilingualModelto audio-basedinference.TurnDetector(version="v1-mini")- no change - Created fresh VAD and STT instances per session (not shared across sessions) - still freezes
Runtime workarounds tested:
- Runtime VAD refresh -
agent.update_options(vad=fresh_vad)when freeze detected - still freezes - Override
_update_vad()- Force fresh VAD instances on every activity - still freezes, logging shows VAD channel exists (closed=False) but emits no events - Disable STT pipeline reuse - Force fresh STT WebSocket each time - still freezes
Evidence During Freeze
When freeze occurs:
user_state="listening"(stuck)agent_state="listening"- No
user_state_changedevents emitted - No STT output/transcripts
- Audio frames arrive at room (verified via
rtc.AudioStream.from_participant()) - VAD channel exists and
closed=False(when VAD is used)
Example Timeline
Successful turns followed by freeze (common pattern)
16:04:51 - Agent speaks (turn 1)
16:04:53 - User response detected successfully
16:04:57 - Agent speaks (turn 2)
16:05:00 - User response detected successfully
16:05:03 - Agent speaks (turn 3)
16:05:06 - User response detected successfully
16:05:09 - Agent speaks (turn 4)
16:05:34 - Agent waits for user response
[FREEZE OCCURS - audio routing stops]
User continues speaking (confirmed via separate audio stream)
No user_state_changed events emitted
No STT transcription output
16:05:39 - WARNING: No user_state events for 5.0s agent_state=listening user_state=listening
16:05:41 - Agent: inactivity prompt 1
16:05:46 - WARNING: No user_state events for 5.0s
16:05:48 - Agent: inactivity prompt 2
16:05:53 - WARNING: No user_state events for 5.0s
16:05:55 - Agent: inactivity prompt 3
16:06:00 - WARNING: No user_state events for 5.0s
16:06:09 - Agent: farewell message and hangup
Note: The freeze can occur after any number of successful turns (sometimes turn 2, sometimes turn 5+). No consistent pattern to when it occurs.
Impact
Blocking production deployment. High call failure rate, poor user experience. Affects self-hosted deployments with outbound SIP.
Root Cause Analysis Needed
Audio frames reach the room but don't reach STT/VAD/turn detection. Need framework investigation of:
- AudioRecognition audio routing - How frames are routed to detection components during multi-turn conversations
- STT stream lifecycle - Why STT stops consuming frames mid-call
- Activity transitions - Whether audio routing breaks during activity handoffs
The fact that all turn detection methods fail identically suggests the issue is in the shared audio routing infrastructure, not in any specific detection component.
- 主要言語
- Python
- スター
- 14.6k
- フォーク
- 3.9k
- 平均マージ
- 2日 7時間
- マージ済み PR(30日)
- 228
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
livekit/agents のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
Assistant markup is stripped from chat history when expressive mode is off対応中かも @ShivamSharma43 が 21 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
livekit/agents#7647 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
docs: openai.LLM vs openai.responses.LLM for HTTP OpenAI-compat hosts再び着手できるかも @AbarnaaSree が 61 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
livekit/agents#7022 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Support CPython 3.15 in livekit-local-inference対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 32/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 1〜2日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
enhancement help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Git-Hospital/githealthcheck#61 ·
メンテナーはふだん 1 日以内に返信
-
changelog investigate
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
ramnes/notion-sdk-py#433 ·
-
Partial method descriptors raise on class access対応中かも @Gambit-Checkmate が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 19 日以内に返信
-
docs pkg:core
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
pydantic/pydantic-ai#11929 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
intake/intake-esm#789 ·