XDHDD commited on
Commit
8093d20
1 Parent(s): cefb462

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -20,6 +20,8 @@ from torchmetrics.audio import ShortTimeObjectiveIntelligibility as STOI
20
  from torchmetrics.audio.pesq import PerceptualEvaluationSpeechQuality as PESQ
21
 
22
 
 
 
23
 
24
  @st.cache
25
  def load_model():
@@ -228,8 +230,17 @@ if st.button('Сгенерировать потери'):
228
 
229
 
230
 
231
-
232
 
 
 
 
 
 
 
 
 
 
 
233
  df = pd.DataFrame(columns=['Audio', 'PESQ', 'STOI', 'PLCMOS', 'LSD'])
234
 
235
  df['Audio'] = ['Clean', 'Lossy', 'Enhanced']
@@ -240,6 +251,8 @@ if st.button('Сгенерировать потери'):
240
 
241
  df['LSD'] = lsd_mass
242
 
 
 
243
  st.table(df)
244
 
245
 
 
20
  from torchmetrics.audio.pesq import PerceptualEvaluationSpeechQuality as PESQ
21
 
22
 
23
+ from plc_mos import PLCMOSEstimator
24
+
25
 
26
  @st.cache
27
  def load_model():
 
230
 
231
 
232
 
 
233
 
234
+
235
+ PLC_example=PLCMOSEstimator()
236
+ PLC_org = PLC_example.run(audio_degraded=data_clean, audio_clean=data_clean)[0]
237
+ PLC_lossy = PLC_example.run(audio_degraded=data_lossy, audio_clean=data_clean)[0]
238
+ PLC_enhanced = PLC_example.run(audio_degraded=data_enhanced, audio_clean=data_clean)[0]
239
+
240
+ PLC_mass = [PLC_org, PLC_lossy, PLC_enhanced]
241
+
242
+
243
+
244
  df = pd.DataFrame(columns=['Audio', 'PESQ', 'STOI', 'PLCMOS', 'LSD'])
245
 
246
  df['Audio'] = ['Clean', 'Lossy', 'Enhanced']
 
251
 
252
  df['LSD'] = lsd_mass
253
 
254
+ df['PLCMOS'] = PLC_mass
255
+
256
  st.table(df)
257
 
258