Skip to content

Commit f367a5d

Browse files
authored
add audio processing module (#363)
1 parent 297360c commit f367a5d

File tree

14 files changed

+459
-84
lines changed

14 files changed

+459
-84
lines changed

.github/workflows/check-types.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
run: python -m pip install --upgrade mypy
3030

3131
- name: Install packages
32-
run: python -m pip install pytest ./livekit-api ./livekit-protocol ./livekit-rtc pydantic
32+
run: python -m pip install pytest ./livekit-api ./livekit-protocol ./livekit-rtc pydantic numpy
3333

3434
- name: Check Types
3535
run: python -m mypy --install-type --non-interactive -p 'livekit-protocol' -p 'livekit-api' -p 'livekit-rtc'

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ jobs:
2323
- name: Run tests
2424
run: |
2525
python3 ./livekit-rtc/rust-sdks/download_ffi.py --output livekit-rtc/livekit/rtc/resources
26-
pip3 install pytest ./livekit-protocol ./livekit-api ./livekit-rtc pydantic
26+
pip3 install pytest ./livekit-protocol ./livekit-api ./livekit-rtc pydantic numpy
2727
pytest . --ignore=livekit-rtc/rust-sdks

livekit-rtc/livekit/rtc/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
from .video_source import VideoSource
7878
from .video_stream import VideoFrameEvent, VideoStream
7979
from .audio_resampler import AudioResampler, AudioResamplerQuality
80+
from .apm import AudioProcessingModule
8081
from .utils import combine_audio_frames
8182
from .rpc import RpcError, RpcInvocationData
8283
from .synchronizer import AVSynchronizer
@@ -163,5 +164,6 @@
163164
"TextStreamWriter",
164165
"ByteStreamReader",
165166
"ByteStreamWriter",
167+
"AudioProcessingModule",
166168
"__version__",
167169
]

livekit-rtc/livekit/rtc/_ffi_client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ def dispose(self) -> None:
104104
self._disposed = True
105105
assert ffi_lib.livekit_ffi_drop_handle(ctypes.c_uint64(self.handle))
106106

107+
def __repr__(self) -> str:
108+
return f"FfiHandle({self.handle})"
109+
107110

108111
T = TypeVar("T")
109112

livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py

Lines changed: 69 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.pyi

Lines changed: 157 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)