Skip to content

Commit 4837cb2

Browse files
authored
Update GriffinLim_example.py
1 parent 698eb5e commit 4837cb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

05-GriffinLim/GriffinLim_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def griffin_lim(stftm_matrix, shape, min_iter=20, max_iter=50, delta=20):
2020
y_iter.append((y, i))
2121

2222
stft_matrix = librosa.core.stft(y) # stft_matrix:(1025,122), stftm_matrix:(1025,122)
23-
stft_matrix = stftm_matrix * stft_matrix / np.abs(stft_matrix) # np.array乘除为对应元素乘除
23+
stft_matrix = stftm_matrix * (stft_matrix / np.abs(stft_matrix)) # np.array乘除为对应元素乘除
2424
y = librosa.core.istft(stft_matrix) # (62208,)
2525

2626
y_iter.append((y, max_iter)) # 当达到max_iter时添加

0 commit comments

Comments
 (0)