From 386ff4261cf9011393abc8ed0aa76673b3a4b655 Mon Sep 17 00:00:00 2001 From: yolo LL Date: Mon, 16 Sep 2024 02:28:24 +0800 Subject: [PATCH] fix Audio buffer is not finite everywhere (#108) --- audio_separator/separator/uvr_lib_v5/spec_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio_separator/separator/uvr_lib_v5/spec_utils.py b/audio_separator/separator/uvr_lib_v5/spec_utils.py index 96e7a07..e152751 100644 --- a/audio_separator/separator/uvr_lib_v5/spec_utils.py +++ b/audio_separator/separator/uvr_lib_v5/spec_utils.py @@ -342,7 +342,7 @@ def cmb_spectrogram_to_wave(spec_m, mp, extra_bins_h=None, extra_bins=None, is_v for d in range(1, bands_n + 1): bp = mp.param["band"][d] - spec_s = np.ndarray(shape=(2, bp["n_fft"] // 2 + 1, spec_m.shape[2]), dtype=complex) + spec_s = np.zeros(shape=(2, bp["n_fft"] // 2 + 1, spec_m.shape[2]), dtype=complex) h = bp["crop_stop"] - bp["crop_start"] spec_s[:, bp["crop_start"] : bp["crop_stop"], :] = spec_m[:, offset : offset + h, :]