XDHDD commited on
Commit
f9a73c9
1 Parent(s): adb8651

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -49,13 +49,13 @@ def visualize(hr, lr, recon):
49
  window = np.hanning(window_size)
50
 
51
  stft_hr = librosa.core.spectrum.stft(hr, n_fft=window_size, hop_length=512, window=window)
52
- #stft_hr = 2 * np.abs(stft_hr) / np.sum(window)
53
 
54
  stft_lr = librosa.core.spectrum.stft(lr, n_fft=window_size, hop_length=512, window=window)
55
- #stft_lr = 2 * np.abs(stft_lr) / np.sum(window)
56
 
57
  stft_recon = librosa.core.spectrum.stft(recon, n_fft=window_size, hop_length=512, window=window)
58
- #stft_recon = 2 * np.abs(stft_recon) / np.sum(window)
59
 
60
  fig, (ax1, ax2, ax3) = plt.subplots(3, 1, sharey=True, sharex=True, figsize=(16, 12))
61
  ax1.title.set_text('Оригинальный сигнал')
 
49
  window = np.hanning(window_size)
50
 
51
  stft_hr = librosa.core.spectrum.stft(hr, n_fft=window_size, hop_length=512, window=window)
52
+ stft_hr = 2 * np.abs(stft_hr) / np.sum(window)
53
 
54
  stft_lr = librosa.core.spectrum.stft(lr, n_fft=window_size, hop_length=512, window=window)
55
+ stft_lr = 2 * np.abs(stft_lr) / np.sum(window)
56
 
57
  stft_recon = librosa.core.spectrum.stft(recon, n_fft=window_size, hop_length=512, window=window)
58
+ stft_recon = 2 * np.abs(stft_recon) / np.sum(window)
59
 
60
  fig, (ax1, ax2, ax3) = plt.subplots(3, 1, sharey=True, sharex=True, figsize=(16, 12))
61
  ax1.title.set_text('Оригинальный сигнал')