From 8b10bdbe328c42a973e38f8d2a96fc59c56031b7 Mon Sep 17 00:00:00 2001 From: BBC-Esq Date: Sat, 26 Oct 2024 20:58:29 -0400 Subject: [PATCH 1/2] Update audio.py --- faster_whisper/audio.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/faster_whisper/audio.py b/faster_whisper/audio.py index 1f1970aa..192b2094 100644 --- a/faster_whisper/audio.py +++ b/faster_whisper/audio.py @@ -53,8 +53,8 @@ def decode_audio( for frame in frames: array = frame.to_ndarray() dtype = array.dtype - raw_buffer.write(array) - + raw_buffer.write(array.tobytes()) + # It appears that some objects related to the resampler are not freed # unless the garbage collector is manually run. # https://github.com/SYSTRAN/faster-whisper/issues/390 From 71f00341827d29fd83cf63514adf800ad01e198c Mon Sep 17 00:00:00 2001 From: BBC-Esq Date: Sat, 26 Oct 2024 20:59:04 -0400 Subject: [PATCH 2/2] Update audio.py --- faster_whisper/audio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faster_whisper/audio.py b/faster_whisper/audio.py index 192b2094..9e98d179 100644 --- a/faster_whisper/audio.py +++ b/faster_whisper/audio.py @@ -54,7 +54,7 @@ def decode_audio( array = frame.to_ndarray() dtype = array.dtype raw_buffer.write(array.tobytes()) - + # It appears that some objects related to the resampler are not freed # unless the garbage collector is manually run. # https://github.com/SYSTRAN/faster-whisper/issues/390