drguilhermeapolinario commited on
Commit
989fd36
1 Parent(s): aaa8c83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -167,7 +167,15 @@ def transcribe_and_respond(audio, web_search):
167
  with gr.Blocks() as demo:
168
  with gr.Row():
169
  web_search = gr.Checkbox(label="Web Search", value=False)
170
- input_audio = gr.Audio(sources=["microphone"], type="filepath")
 
 
 
 
 
 
 
 
171
  output_audio = gr.Audio(label="AI Response", autoplay=True)
172
 
173
  is_recording = gr.State(False)
 
167
  with gr.Blocks() as demo:
168
  with gr.Row():
169
  web_search = gr.Checkbox(label="Web Search", value=False)
170
+ Adjusted Gradio Audio Component with Silence Threshold
171
+
172
+ input_audio = gr.Audio(
173
+ sources=["microphone"],
174
+ type="filepath",
175
+ streaming=True,
176
+ min_value=-0.1, # Adjust this value to set the silence threshold
177
+ max_value=0.1 # Adjust this value to set the silence threshold
178
+ )
179
  output_audio = gr.Audio(label="AI Response", autoplay=True)
180
 
181
  is_recording = gr.State(False)