Zasha1 commited on
Commit
f741659
·
verified ·
1 Parent(s): bf89d68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -35,6 +35,10 @@ def real_time_analysis():
35
  mic_list = list_audio_devices()
36
  st.write(f"Available audio devices: {mic_list}")
37
 
 
 
 
 
38
  # Use the virtual microphone (device index 0)
39
  mic = sr.Microphone(device_index=0) # Use the virtual microphone device index
40
 
@@ -108,6 +112,7 @@ def real_time_analysis():
108
  except Exception as e:
109
  st.error(f"Error in real-time analysis: {e}")
110
 
 
111
  def generate_comprehensive_summary(chunks):
112
  """Generate a comprehensive summary from conversation chunks."""
113
  full_text = " ".join([chunk[0] for chunk in chunks])
 
35
  mic_list = list_audio_devices()
36
  st.write(f"Available audio devices: {mic_list}")
37
 
38
+ if not mic_list:
39
+ st.error("No audio devices found. Please check the virtual microphone setup.")
40
+ return
41
+
42
  # Use the virtual microphone (device index 0)
43
  mic = sr.Microphone(device_index=0) # Use the virtual microphone device index
44
 
 
112
  except Exception as e:
113
  st.error(f"Error in real-time analysis: {e}")
114
 
115
+
116
  def generate_comprehensive_summary(chunks):
117
  """Generate a comprehensive summary from conversation chunks."""
118
  full_text = " ".join([chunk[0] for chunk in chunks])