Update app.py
Browse files
app.py
CHANGED
@@ -212,16 +212,16 @@ if st.button('Сгенерировать потери'):
|
|
212 |
|
213 |
lsd_mass=[lsd_orig, lsd_lossy, lsd_enhanced]
|
214 |
|
215 |
-
if samplerate !=
|
216 |
-
data_lossy = librosa.resample(data_lossy, orig_sr=48000, target_sr=
|
217 |
-
data_clean = librosa.resample(data_clean, orig_sr=48000, target_sr=
|
218 |
-
data_enhanced = librosa.resample(data_enhanced, orig_sr=48000, target_sr=
|
219 |
|
220 |
|
221 |
|
222 |
-
pesq_orig = pesq(fs =
|
223 |
-
pesq_lossy = pesq(fs =
|
224 |
-
pesq_enhanced = pesq(fs =
|
225 |
|
226 |
psq_mas=[pesq_orig, pesq_lossy, pesq_enhanced]
|
227 |
|
|
|
212 |
|
213 |
lsd_mass=[lsd_orig, lsd_lossy, lsd_enhanced]
|
214 |
|
215 |
+
if samplerate != 16000:
|
216 |
+
data_lossy = librosa.resample(data_lossy, orig_sr=48000, target_sr=16000)
|
217 |
+
data_clean = librosa.resample(data_clean, orig_sr=48000, target_sr=16000)
|
218 |
+
data_enhanced = librosa.resample(data_enhanced, orig_sr=48000, target_sr=16000)
|
219 |
|
220 |
|
221 |
|
222 |
+
pesq_orig = pesq(fs = 16000, ref = data_clean, deg = data_clean, mode='wb')
|
223 |
+
pesq_lossy = pesq(fs = 16000, ref = data_clean, deg = data_lossy, mode='wb')
|
224 |
+
pesq_enhanced = pesq(fs = 16000, ref = data_clean, deg = data_enhanced, mode='wb')
|
225 |
|
226 |
psq_mas=[pesq_orig, pesq_lossy, pesq_enhanced]
|
227 |
|