Update infer.py
Browse files
infer.py
CHANGED
@@ -26,7 +26,7 @@ def infer_image(img: Image.Image, size_modifier: int ) -> Image.Image:
|
|
26 |
|
27 |
def infer_video(video_filepath: str, size_modifier: int) -> str:
|
28 |
# Extract audio from the original video file
|
29 |
-
audio =
|
30 |
audio_data = np.frombuffer(audio.readAll(), dtype=np.int16)
|
31 |
audio_array = np.array(audio_data, dtype=np.int16)
|
32 |
|
|
|
26 |
|
27 |
def infer_video(video_filepath: str, size_modifier: int) -> str:
|
28 |
# Extract audio from the original video file
|
29 |
+
audio = cv.AudioCapture(video_filepath)
|
30 |
audio_data = np.frombuffer(audio.readAll(), dtype=np.int16)
|
31 |
audio_array = np.array(audio_data, dtype=np.int16)
|
32 |
|