From e92ddd291a56d6bf960eef292ac9ec46b8970b36 Mon Sep 17 00:00:00 2001 From: Chronoz Date: Sun, 31 Dec 2023 20:59:33 +0700 Subject: [PATCH] fix exception on overflow --- whisper_live/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/whisper_live/client.py b/whisper_live/client.py index 633c1237..018e0904 100644 --- a/whisper_live/client.py +++ b/whisper_live/client.py @@ -412,7 +412,7 @@ def record(self, out_file="output_recording.wav"): for _ in range(0, int(self.rate / self.chunk * self.record_seconds)): if not self.recording: break - data = self.stream.read(self.chunk) + data = self.stream.read(self.chunk, exception_on_overflow = False) self.frames += data audio_array = Client.bytes_to_float_array(data)