Update app.py
Browse files
app.py
CHANGED
@@ -224,16 +224,16 @@ if st.button('Сгенерировать потери'):
|
|
224 |
|
225 |
#lsd_mass=[lsd_orig, lsd_lossy, lsd_enhanced]
|
226 |
|
227 |
-
if samplerate !=
|
228 |
-
data_lossy = librosa.resample(data_lossy, orig_sr=48000, target_sr=
|
229 |
-
data_clean = librosa.resample(data_clean, orig_sr=48000, target_sr=
|
230 |
-
data_enhanced = librosa.resample(data_enhanced, orig_sr=48000, target_sr=
|
231 |
|
232 |
|
233 |
|
234 |
-
pesq_orig = pesq(fs =
|
235 |
-
pesq_lossy = pesq(fs =
|
236 |
-
pesq_enhanced = pesq(fs =
|
237 |
|
238 |
psq_mas=[pesq_orig, pesq_lossy, pesq_enhanced]
|
239 |
|
|
|
224 |
|
225 |
#lsd_mass=[lsd_orig, lsd_lossy, lsd_enhanced]
|
226 |
|
227 |
+
if samplerate != 16000:
|
228 |
+
data_lossy = librosa.resample(data_lossy, orig_sr=48000, target_sr=16000)
|
229 |
+
data_clean = librosa.resample(data_clean, orig_sr=48000, target_sr=16000)
|
230 |
+
data_enhanced = librosa.resample(data_enhanced, orig_sr=48000, target_sr=16000)
|
231 |
|
232 |
|
233 |
|
234 |
+
pesq_orig = pesq(fs = 16000, ref = data_clean, deg = data_clean, mode='wb')
|
235 |
+
pesq_lossy = pesq(fs = 16000, ref = data_clean, deg = data_lossy, mode='wb')
|
236 |
+
pesq_enhanced = pesq(fs = 16000, ref = data_clean, deg = data_enhanced, mode='wb')
|
237 |
|
238 |
psq_mas=[pesq_orig, pesq_lossy, pesq_enhanced]
|
239 |
|