We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30ac4e9 commit 07560d5Copy full SHA for 07560d5
1 file changed
livekit-rtc/livekit/rtc/audio_frame.py
@@ -64,6 +64,7 @@ def __init__(
64
self._sample_rate = sample_rate
65
self._num_channels = num_channels
66
self._samples_per_channel = samples_per_channel
67
+ self._user_data: dict[str, Any] = {}
68
69
@staticmethod
70
def create(sample_rate: int, num_channels: int, samples_per_channel: int) -> "AudioFrame":
@@ -100,6 +101,13 @@ def _proto_info(self) -> proto_audio.AudioFrameBufferInfo:
100
101
audio_info.samples_per_channel = self.samples_per_channel
102
return audio_info
103
104
+ @property
105
+ def user_data(self) -> dict[str, Any]:
106
+ """
107
+ Returns the user data associated with the audio frame.
108
109
+ return self._user_data
110
+
111
@property
112
def data(self) -> memoryview:
113
"""
0 commit comments