Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ import onnxruntime, onnx
|
|
11 |
import matplotlib.pyplot as plt
|
12 |
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
|
13 |
from pystoi import stoi
|
14 |
-
from pesq import pesq
|
15 |
import pandas as pd
|
16 |
import torchaudio
|
17 |
|
@@ -143,16 +143,16 @@ if st.button('Сгенерировать потери'):
|
|
143 |
stoi_mass=[stoi_orig, stoi_lossy, stoi_enhanced]
|
144 |
|
145 |
|
146 |
-
if samplerate != 16000:
|
147 |
-
|
148 |
-
|
149 |
-
|
|
|
|
|
|
|
|
|
150 |
|
151 |
-
pesq_orig
|
152 |
-
pesq_lossy = pesq(fs = 16000, ref = data_clean, deg = data_lossy, mode='nb')
|
153 |
-
pesq_enhanced = pesq(fs = 16000, ref = data_clean, deg = data_enhanced, mode='nb')
|
154 |
-
|
155 |
-
psq_mas=[pesq_orig, pesq_lossy, pesq_enhanced]
|
156 |
|
157 |
|
158 |
|
@@ -160,7 +160,7 @@ if st.button('Сгенерировать потери'):
|
|
160 |
|
161 |
df['Audio'] = ['Clean', 'Lossy', 'Enhanced']
|
162 |
|
163 |
-
df['PESQ'] = psq_mas
|
164 |
|
165 |
df['STOI'] = stoi_mass
|
166 |
|
|
|
11 |
import matplotlib.pyplot as plt
|
12 |
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
|
13 |
from pystoi import stoi
|
14 |
+
#from pesq import pesq
|
15 |
import pandas as pd
|
16 |
import torchaudio
|
17 |
|
|
|
143 |
stoi_mass=[stoi_orig, stoi_lossy, stoi_enhanced]
|
144 |
|
145 |
|
146 |
+
#if samplerate != 16000:
|
147 |
+
# data_lossy = librosa.resample(data_lossy, orig_sr=48000, target_sr=16000)
|
148 |
+
# data_clean = librosa.resample(data_clean, orig_sr=48000, target_sr=16000)
|
149 |
+
# data_enhanced = librosa.resample(data_enhanced, orig_sr=48000, target_sr=16000)
|
150 |
+
#
|
151 |
+
#pesq_orig = pesq(fs = 16000, ref = data_clean, deg = data_clean, mode='nb')
|
152 |
+
#pesq_lossy = pesq(fs = 16000, ref = data_clean, deg = data_lossy, mode='nb')
|
153 |
+
#pesq_enhanced = pesq(fs = 16000, ref = data_clean, deg = data_enhanced, mode='nb')
|
154 |
|
155 |
+
#psq_mas=[pesq_orig, pesq_lossy, pesq_enhanced]
|
|
|
|
|
|
|
|
|
156 |
|
157 |
|
158 |
|
|
|
160 |
|
161 |
df['Audio'] = ['Clean', 'Lossy', 'Enhanced']
|
162 |
|
163 |
+
#df['PESQ'] = psq_mas
|
164 |
|
165 |
df['STOI'] = stoi_mass
|
166 |
|