diff --git a/examples/face_landmark/face_landmark.py b/examples/face_landmark/face_landmark.py index ae7c877b..3da5232a 100644 --- a/examples/face_landmark/face_landmark.py +++ b/examples/face_landmark/face_landmark.py @@ -111,14 +111,15 @@ async def frame_loop(video_stream: rtc.VideoStream) -> None: buffer = frame_event.frame buffer = buffer.convert(rtc.VideoBufferType.RGBA) - arr = np.frombuffer(buffer.data, dtype=np.uint8) arr = arr.reshape((buffer.height, buffer.width, 4)) arr = cv2.cvtColor(arr, cv2.COLOR_RGBA2RGB) mp_image = mp.Image(image_format=mp.ImageFormat.SRGB, data=arr) - detection_result = landmarker.detect_for_video(mp_image, frame_event.timestamp_us) + detection_result = landmarker.detect_for_video( + mp_image, frame_event.timestamp_us + ) draw_landmarks_on_image(arr, detection_result) diff --git a/livekit-rtc/livekit/rtc/audio_stream.py b/livekit-rtc/livekit/rtc/audio_stream.py index ff497acf..0a275a35 100644 --- a/livekit-rtc/livekit/rtc/audio_stream.py +++ b/livekit-rtc/livekit/rtc/audio_stream.py @@ -29,7 +29,6 @@ class AudioFrameEvent: frame: AudioFrame - class AudioStream: """AudioStream is a stream of audio frames received from a RemoteTrack."""