Sxian/clt 2919/integrate platform audio#669
Open
xianshijing-lk wants to merge 7 commits into
Open
Conversation
f519dde to
52bed9f
Compare
Base automatically changed from
sxian/CLT-2919/update-livekit-ffi-0.12.57
to
main
May 18, 2026 10:26
- Update rust-sdks submodule to latest main (497527d4) - Regenerate protobuf files - Includes: Fix LocalTrackPublished handle leak, WebRTC ADM integration, and other improvements Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
52bed9f to
2ef05f0
Compare
Contributor
|
@copilot, please check the |
Agent-Logs-Url: https://github.com/livekit/python-sdks/sessions/df3730e3-6da1-4dbf-a628-b5f7d511886f Co-authored-by: cloudwebrtc <17733746+cloudwebrtc@users.noreply.github.com>
Contributor
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds PlatformAudio support to the Python SDK, enabling microphone capture via WebRTC's Audio Device Module (ADM) with built-in voice processing.
Changes
New: livekit-rtc/livekit/rtc/platform_audio.py
Modified: livekit-rtc/livekit/rtc/track.py
Modified: livekit-rtc/livekit/rtc/init.py
Modified: livekit-rtc/livekit/rtc/room.py
Modified: examples/basic_room.py
New: examples/README.md
PlatformAudio vs Synthetic Mode
┌───────────────────────────────┬───────────────┬───────────────────────────────────────┐
│ Feature │ PlatformAudio │ Synthetic │
├───────────────────────────────┼───────────────┼───────────────────────────────────────┤
│ Voice processing (AEC/NS/AGC) │ Built-in │ Manual │
├───────────────────────────────┼───────────────┼───────────────────────────────────────┤
│ Raw frame access │ No │ Yes │
├───────────────────────────────┼───────────────┼───────────────────────────────────────┤
│ External audio libs needed │ No │ Yes │
├───────────────────────────────┼───────────────┼───────────────────────────────────────┤
│ Use case │ Voice calls │ Custom processing, TTS, file playback │
└───────────────────────────────┴───────────────┴───────────────────────────────────────┘
Both modes can run simultaneously (e.g., mic + background music).
Test Procedure
cd examples
python basic_room.py --list-devices
Expected: Lists available microphones and speakers with device IDs.
Start LiveKit server
livekit-server --dev
In another terminal
export LIVEKIT_URL=ws://localhost:7880
export LIVEKIT_API_KEY=devkey
export LIVEKIT_API_SECRET=secret
python basic_room.py --platform-audio --room test-room
Expected: Connects to room, publishes microphone track with voice processing.
python basic_room.py --platform-audio --mic-id "" --room test-room
Expected: Uses specified microphone.
python basic_room.py --file test.wav --room test-room
Expected: Publishes audio from WAV file.
python basic_room.py --platform-audio --file test.wav --room test-room
Expected: Publishes two audio tracks - microphone and file.
Open https://meet.livekit.io and join the same room to verify audio is received.