Update app.py
Browse files
app.py
CHANGED
@@ -129,13 +129,13 @@ if st.button('Сгенерировать потери'):
|
|
129 |
|
130 |
data_lossy, samplerate = torchaudio.load('lossy.wav')
|
131 |
data_enhanced, samplerate = torchaudio.load('enhanced.wav')
|
132 |
-
min_len = min(data_clean.shape[1], data_lossy.shape[1])
|
133 |
data_clean = data_clean[:, :min_len]
|
134 |
data_lossy = data_lossy[:, :min_len]
|
135 |
data_enhanced = data_enhanced[:, :min_len]
|
136 |
|
137 |
|
138 |
-
stoi = STOI(
|
139 |
stoi_orig = round(float(stoi(data_clean, data_clean)),3)
|
140 |
stoi_lossy = round(float(stoi(data_clean, data_lossy)),5)
|
141 |
stoi_enhanced = round(float(stoi(data_clean, data_enhanced)),5)
|
|
|
129 |
|
130 |
data_lossy, samplerate = torchaudio.load('lossy.wav')
|
131 |
data_enhanced, samplerate = torchaudio.load('enhanced.wav')
|
132 |
+
min_len = min(data_clean.shape[1], data_lossy.shape[1], data_enhanced.shape[1])
|
133 |
data_clean = data_clean[:, :min_len]
|
134 |
data_lossy = data_lossy[:, :min_len]
|
135 |
data_enhanced = data_enhanced[:, :min_len]
|
136 |
|
137 |
|
138 |
+
stoi = STOI(samplerate)
|
139 |
stoi_orig = round(float(stoi(data_clean, data_clean)),3)
|
140 |
stoi_lossy = round(float(stoi(data_clean, data_lossy)),5)
|
141 |
stoi_enhanced = round(float(stoi(data_clean, data_enhanced)),5)
|