XDHDD commited on
Commit
800f181
1 Parent(s): c376e84

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -33
app.py CHANGED
@@ -419,12 +419,7 @@ if st.button('Сгенерировать потери'):
419
  enhanced = ''
420
  #except speech_r.RequestError as e:
421
  #st.text("Ошибка при запросе к сервису распознавания речи; {0}".format(e))
422
-
423
-
424
-
425
-
426
-
427
-
428
  error1 = wer(orig, orig)
429
  error2 = wer(orig, lossy)
430
  error3 = wer(orig, enhanced)
@@ -433,33 +428,7 @@ if st.button('Сгенерировать потери'):
433
  df_1['WER'] = WER_mass
434
 
435
  st.subheader('4. Метрики аудио')
436
- st.dataframe(df_1)
437
-
438
-
439
- tab1, tab2, tab3, tab4, tab5 = st.tabs(["PESQ", "STOI", "PLCMOSv1", "PLCMOSv2", "WER"])
440
-
441
- with tab1:
442
- st.header("PESQ")
443
- st.bar_chart(df_1, x="Audio", y="PESQ")
444
- with tab2:
445
- st.header("STOI")
446
- st.bar_chart(df_1, x="Audio", y="STOI")
447
- with tab3:
448
- st.header("PLCMOSv1")
449
- st.bar_chart(df_1, x="Audio", y="PLCMOSv1")
450
- with tab4:
451
- st.header("PLCMOSv2")
452
- st.bar_chart(df_1, x="Audio", y="PLCMOSv2")
453
- with tab5:
454
- st.header("WER")
455
- st.bar_chart(df_1, x="Audio", y="WER")
456
- #st.bar_chart(df_1, x="Audio", y="PESQ")
457
- #st.bar_chart(df_1, x="Audio", y="STOI")
458
- #st.bar_chart(df_1, x="Audio", y="PLCMOSv1")
459
- #st.bar_chart(df_1, x="Audio", y="PLCMOSv2")
460
- #st.bar_chart(df_1, x="Audio", y="WER")
461
-
462
-
463
  st.write("Original")
464
  col1, col2, col3, col4, col5 = st.columns(5)
465
  col1.metric("PESQ", value = round(psq_mas[0],3))
@@ -491,6 +460,31 @@ if st.button('Сгенерировать потери'):
491
  WER_s = sign_x_y(WER_mass[1], WER_mass[2])
492
  col5.metric("WAcc", value = round(WER_mass[2],3), delta = WER_s + str(round((abs(WER_mass[2] - WER_mass[1]) / WER_mass[1]) * 100.0,3))+'%')
493
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
494
  #col1.metric("PESQ", value = psq_mas[-1], delta = psq_mas[-1] - psq_mas[-2])
495
  #col2.metric("STOI", value = stoi_mass[-1], delta = stoi_mass[-1] - stoi_mass[-2])
496
  #col3.metric("PLCMOSv1", value = PLC_massv1[-1], delta = PLC_massv1[-1] - PLC_massv1[-2])
 
419
  enhanced = ''
420
  #except speech_r.RequestError as e:
421
  #st.text("Ошибка при запросе к сервису распознавания речи; {0}".format(e))
422
+
 
 
 
 
 
423
  error1 = wer(orig, orig)
424
  error2 = wer(orig, lossy)
425
  error3 = wer(orig, enhanced)
 
428
  df_1['WER'] = WER_mass
429
 
430
  st.subheader('4. Метрики аудио')
431
+ #st.dataframe(df_1)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
432
  st.write("Original")
433
  col1, col2, col3, col4, col5 = st.columns(5)
434
  col1.metric("PESQ", value = round(psq_mas[0],3))
 
460
  WER_s = sign_x_y(WER_mass[1], WER_mass[2])
461
  col5.metric("WAcc", value = round(WER_mass[2],3), delta = WER_s + str(round((abs(WER_mass[2] - WER_mass[1]) / WER_mass[1]) * 100.0,3))+'%')
462
 
463
+ tab1, tab2, tab3, tab4, tab5 = st.tabs(["PESQ", "STOI", "PLCMOSv1", "PLCMOSv2", "WER"])
464
+
465
+ with tab1:
466
+ st.header("PESQ")
467
+ st.bar_chart(df_1, x="Audio", y="PESQ")
468
+ with tab2:
469
+ st.header("STOI")
470
+ st.bar_chart(df_1, x="Audio", y="STOI")
471
+ with tab3:
472
+ st.header("PLCMOSv1")
473
+ st.bar_chart(df_1, x="Audio", y="PLCMOSv1")
474
+ with tab4:
475
+ st.header("PLCMOSv2")
476
+ st.bar_chart(df_1, x="Audio", y="PLCMOSv2")
477
+ with tab5:
478
+ st.header("WER")
479
+ st.bar_chart(df_1, x="Audio", y="WER")
480
+ #st.bar_chart(df_1, x="Audio", y="PESQ")
481
+ #st.bar_chart(df_1, x="Audio", y="STOI")
482
+ #st.bar_chart(df_1, x="Audio", y="PLCMOSv1")
483
+ #st.bar_chart(df_1, x="Audio", y="PLCMOSv2")
484
+ #st.bar_chart(df_1, x="Audio", y="WER")
485
+
486
+
487
+
488
  #col1.metric("PESQ", value = psq_mas[-1], delta = psq_mas[-1] - psq_mas[-2])
489
  #col2.metric("STOI", value = stoi_mass[-1], delta = stoi_mass[-1] - stoi_mass[-2])
490
  #col3.metric("PLCMOSv1", value = PLC_massv1[-1], delta = PLC_massv1[-1] - PLC_massv1[-2])