diff --git a/lib_v5/spec_utils.py b/lib_v5/spec_utils.py index 8ec520d9..71a47bba 100644 --- a/lib_v5/spec_utils.py +++ b/lib_v5/spec_utils.py @@ -312,7 +312,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, :]