From 3e49fe39c766ffd8cf37d647ace41e770083de35 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 14 Sep 2024 20:59:12 +0800 Subject: [PATCH] bugfix --- rtcllm/vad.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtcllm/vad.py b/rtcllm/vad.py index 57b26d9..b5e3b79 100644 --- a/rtcllm/vad.py +++ b/rtcllm/vad.py @@ -139,7 +139,8 @@ class AudioTrackVad(MediaStreamTrack): return fs def frames_write_wave(self, frames): - ndarr = np.frombuffer(b''.join(frames), dtype=np.int16) + fb = [ self.frame2btyes(f) for f in frames ] + ndarr = np.frombuffer(b''.join(fb), dtype=np.int16) fn = temp_file(suffix='.wav') write(fn, frames[0].sample_rate, ndarr) return fn