AshishNoel14 commited on
Commit
125df1b
·
verified ·
1 Parent(s): 41d7bd9

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. app.py +13 -0
  2. config.py +11 -0
app.py CHANGED
@@ -206,6 +206,19 @@ if uploaded_file is not None:
206
  hide_index=True
207
  )
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  # Download Button
210
  csv = df_results.to_csv(index=False).encode('utf-8')
211
  st.download_button(
 
206
  hide_index=True
207
  )
208
 
209
+ # --- Qualitative Feedback Section ---
210
+ failed_rows = df_results[df_results['Result'] == 'FAIL']
211
+ if not failed_rows.empty:
212
+ st.divider()
213
+ st.subheader("🛠️ Recommendations for Improvement")
214
+ for index, row in failed_rows.iterrows():
215
+ metric = row['Metric']
216
+ feedback = config.METRIC_FEEDBACK.get(metric, "Check your setup.")
217
+
218
+ with st.expander(f"Fix for {metric} (Score: {row['Score']})", expanded=True):
219
+ st.markdown(feedback)
220
+ # ------------------------------------
221
+
222
  # Download Button
223
  csv = df_results.to_csv(index=False).encode('utf-8')
224
  st.download_button(
config.py CHANGED
@@ -22,3 +22,14 @@ METRIC_DESCRIPTIONS = {
22
  'Recording SR': 'Digital Sampling Rate of the file (should be >= 44.1kHz)',
23
  'Mic SR': 'Estimated effective bandwidth of the microphone (should conform to > 16kHz capture)'
24
  }
 
 
 
 
 
 
 
 
 
 
 
 
22
  'Recording SR': 'Digital Sampling Rate of the file (should be >= 44.1kHz)',
23
  'Mic SR': 'Estimated effective bandwidth of the microphone (should conform to > 16kHz capture)'
24
  }
25
+
26
+ METRIC_FEEDBACK = {
27
+ 'SRMR': "The audio has high reverberation or room echo. \n**Fix:** Record in a smaller room, use sound-absorbing materials (curtains, foam), or get closer to the mic.",
28
+ 'SIGMOS_DISC': "The audio sounds choppy or has interruptions. \n**Fix:** Check your internet connection (if VoIP), reduce CPU load, or check for faulty cables.",
29
+ 'VQScore': "The voice quality is degraded (robotic, fuzzy). \n**Fix:** Use a higher quality microphone, check for codec compression issues, or increase bitrate.",
30
+ 'WVMOS': "The overall subjective quality is low. \n**Fix:** This is a comprehensive score. Check for background noise, bad mic, or aggressive compression. Try recording a cleaner sample.",
31
+ 'SIGMOS_OVRL': "The overall signal quality is poor. \n**Fix:** Ensure a quiet environment and a decent microphone. Avoid post-processing that introduces artifacts.",
32
+ 'SIGMOS_REVERB': "Too much echo detected. \n**Fix:** Treat your room acoustics or move the microphone away from reflective surfaces (walls, windows).",
33
+ 'Recording SR': "The file quality is low (Sample Rate < 44.1kHz). \n**Fix:** Check your recording software settings and ensure it's set to 44.1kHz or 48kHz.",
34
+ 'Mic SR': "The microphone is not capturing the full frequency range (Low Bandwidth). \n**Fix:** You might be using a low-quality mic (e.g., Bluetooth headset) or a high-cut filter is active. Use a better mic or check filters."
35
+ }