Skip to content

Commit f20abdd

Browse files
committed
feat: add userdata to audioframe constructor
This was raised here: livekit/plugins-ai-coustics-internal#30 (comment)
1 parent d92a7f3 commit f20abdd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

livekit-rtc/livekit/rtc/audio_frame.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def __init__(
3333
sample_rate: int,
3434
num_channels: int,
3535
samples_per_channel: int,
36+
userdata: dict[str, Any] = {},
3637
) -> None:
3738
"""
3839
Initialize an AudioFrame instance.
@@ -64,7 +65,7 @@ def __init__(
6465
self._sample_rate = sample_rate
6566
self._num_channels = num_channels
6667
self._samples_per_channel = samples_per_channel
67-
self._userdata: dict[str, Any] = {}
68+
self._userdata: dict[str, Any] = userdata
6869

6970
@staticmethod
7071
def create(sample_rate: int, num_channels: int, samples_per_channel: int) -> "AudioFrame":

0 commit comments

Comments
 (0)