Skip to content

Commit 04466b8

Browse files
authored
feat: add rtc.AudioResampler using soxr (#264)
1 parent 7a9311a commit 04466b8

File tree

12 files changed

+608
-61
lines changed

12 files changed

+608
-61
lines changed

livekit-rtc/livekit/rtc/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
)
7070
from .video_source import VideoSource
7171
from .video_stream import VideoFrameEvent, VideoStream
72+
from .audio_resampler import AudioResampler, AudioResamplerQuality
7273

7374
__all__ = [
7475
"ConnectionQuality",
@@ -127,5 +128,7 @@
127128
"VideoStream",
128129
"ChatManager",
129130
"ChatMessage",
131+
"AudioResampler",
132+
"AudioResamplerQuality",
130133
"__version__",
131134
]

livekit-rtc/livekit/rtc/_ffi_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,10 @@ class FfiClient:
192192
_instance: Optional["FfiClient"] = None
193193

194194
@classproperty
195-
def instance(self):
196-
if self._instance is None:
197-
self._instance = FfiClient()
198-
return self._instance
195+
def instance(cls) -> "FfiClient":
196+
if cls._instance is None:
197+
cls._instance = FfiClient()
198+
return cls._instance
199199

200200
def __init__(self) -> None:
201201
self._lock = threading.RLock()

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

Lines changed: 51 additions & 29 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: 252 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)