Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

Add frame processor support for audio streams#533

Merged
lukasIO merged 18 commits intomainlivekit/python-sdks:mainfrom
lukas/frame-processorlivekit/python-sdks:lukas/frame-processorCopy head branch name to clipboard
Dec 11, 2025
Merged

Add frame processor support for audio streams#533
lukasIO merged 18 commits intomainlivekit/python-sdks:mainfrom
lukas/frame-processorlivekit/python-sdks:lukas/frame-processorCopy head branch name to clipboard

Conversation

@lukasIO
Copy link
Contributor

@lukasIO lukasIO commented Dec 2, 2025

No description provided.

Copy link
Contributor

@ladvoc ladvoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

livekit-rtc/livekit/rtc/frame_processor.py Show resolved Hide resolved
livekit-rtc/livekit/rtc/audio_stream.py Show resolved Hide resolved
livekit-rtc/livekit/rtc/frame_processor.py Outdated Show resolved Hide resolved
Copy link
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lg

owned_buffer_info = audio_event.frame_received.frame
frame = AudioFrame._from_owned_info(owned_buffer_info)
if self._processor is not None:
frame = self._processor._process(frame)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat.. this is clean

Copy link
Member

@theomonnom theomonnom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

livekit-rtc/livekit/rtc/frame_processor.py Outdated Show resolved Hide resolved
livekit-rtc/livekit/rtc/frame_processor.py Outdated Show resolved Hide resolved
def _process(self, frame: T) -> T: ...

@abstractmethod
def _close(self): ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's OK for close to be public

Suggested change
def _close(self): ...
def close(self): ...

Copy link
Contributor Author

@lukasIO lukasIO Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking close would rather be an internal method that we call to end the lifecycle of a processor.

Users would be expected to disable it with processor.enabled = False.

livekit-rtc/livekit/rtc/frame_processor.py Outdated Show resolved Hide resolved
Co-authored-by: Théo Monnom <theo.8bits@gmail.com>
manylinux-pypy_aarch64-image = "manylinux_2_28"

[tool.cibuildwheel.linux]
before-build = "pip install requests && python rust-sdks/download_ffi.py --output livekit/rtc/resources && yum install -y libX11-devel libXrandr-devel libXext-devel libXfixes-devel libXdamage-devel libXcomposite-devel libXi-devel mesa-libGL-devel || apt install -y xorg-dev" No newline at end of file
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theomonnom calling this out explicitly for you to take a look.
After updating FFI we need these deps for the desktop capturer and the wheels repair command was failing with out them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine, but we should make sure the SDK is still working without users having to install those deps in their prod environment

@lukasIO lukasIO merged commit 26b785a into main Dec 11, 2025
16 checks passed
@lukasIO lukasIO deleted the lukas/frame-processor branch December 11, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.