fix(room-io): preserve audio frame processors across stream transitions#5455
fix(room-io): preserve audio frame processors across stream transitions#5455nightcityblade wants to merge 2 commits intolivekit:mainfrom
Conversation
|
nightcityblade seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
Thanks, good catch. I restored the selector-created processor cleanup for participant changes that do not immediately create a replacement stream, including and switching to a participant with no available track yet. I also added regression coverage for both paths and reran the targeted room I/O noise cancellation tests. |
|
thanks for the pr! If you don't mind I created a separate one with some cleanup and a different impl in #5467 |
|
Thanks for the heads-up, and thanks for putting together the follow-up PR with the cleanup and alternate implementation. That sounds good to me. Since you've got #5467 moving forward, I'm happy to defer to that one. |
Fixes #5448
Summary
_ParticipantInputStream._close_stream()from closing the active frame processor during ordinary stream transitions_ParticipantAudioInputStream._create_stream()and close orphaned processors when a track disappears without replacementrtc.FrameProcessorpassed vianoise_cancellationso it survives the initial subscription and still closes during final teardownTesting
.venv/bin/python -m pytest tests/test_room_io_noise_cancellation.py tests/test_room_io_teardown.py.venv/bin/ruff check livekit-agents/livekit/agents/voice/room_io/_input.py tests/test_room_io_noise_cancellation.py tests/test_room_io_teardown.py