DataStreamAudioReceiver retains registrations after close and shares clear-buffer routing across rooms
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 20/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
Start by reading DataStreamAudioReceiver and Room.register_byte_stream_handler, then trace how clear-buffer RPCs are registered, dispatched, and cleaned up. Check the supplied reproduction and validation records for their stated scope. Done means handlers are safely registered and removed across close, failed start, and separate rooms, and the end marker exposes whether the segment was cleared; the proposed fix is already linked in the issue.
索引モデルが issue の本文から書いたものです。
説明
Observed against livekit/agents commit 11c8ad8d74c272cf046e65d83cfe7be46abaec64.
DataStreamAudioReceiver registers a byte-stream handler on its Room, while clear-buffer RPCs are dispatched through a process-wide dictionary keyed only by sender identity. aclose() closes tasks and channels but does not remove either registration.
This produces two lifecycle problems:
- A receiver cannot be closed and recreated on the same Room: the existing lk.audio_stream handler still owns the topic.
- Two different rooms with the same sender identity overwrite the shared clear-buffer dispatch entry. An RPC received in one room can be dispatched to the other room's receiver.
Room.register_byte_stream_handler already rejects a second handler for the same topic. Therefore one receiver per Room is an existing constraint; a process-wide multiplexing table does not enable multiple receivers in one Room.
Proposed fix:
- Register the instance RPC on the receiver's own Room.
- Acquire the exclusive byte-stream registration before registering the RPC.
- Undo that registration if RPC registration fails.
- Unregister both handlers when the owning receiver closes. Closing a second receiver whose start failed must not remove the first receiver's handlers.
A separate public API question arises when handling clear_buffer. The receiver still emits AudioSegmentEnd for a cleared reader, but that event does not expose whether the segment was cleared. Consumers cannot distinguish it from a normally completed segment without reading receiver internals. The attached proposal adds AudioSegmentEnd.interrupted, populated from the receiver's existing cleared flag; it preserves the existing end marker and introduces no new turn state machine.
The registration fix and public end-marker field can be reviewed separately if maintainers prefer. No package version or changelog change is proposed.
Validation results and the standalone real-RTC reproduction are supplied alongside this draft. They must be read with their stated scope; this is not a GPU avatar acceptance report.
Submitted fix and reproducible evidence
Proposed fix: https://github.com/livekit/agents/pull/8289
Standalone reproduction, baseline/proposed results, patch and validation records. The evidence is pinned to a contribution commit and is separate from the source-change PR.
- 主要言語
- Python
- スター
- 14.6k
- フォーク
- 3.9k
- 平均マージ
- 2日 20時間
- マージ済み PR(30日)
- 248
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
livekit/agents のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
livekit/agents#8284 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ci: unit tests pin Python 3.12 while the package advertises 3.14 support対応中かも @huong8373tt-beep が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
livekit/agents#8231 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Assistant markup is stripped from chat history when expressive mode is off対応中かも @ShivamSharma43 が 26 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
livekit/agents#7647 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
docs: openai.LLM vs openai.responses.LLM for HTTP OpenAI-compat hosts再び着手できるかも @AbarnaaSree が 65 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
livekit/agents#7022 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
yt-project/yt#5624 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NousResearch/hermes-agent#148376 ·
メンテナーはふだん 1 日以内に返信
-
Analysis
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
SACGF/variantgrid#2615 ·
メンテナーはふだん 1 日以内に返信