nagasurendra commited on
Commit
14efee4
·
verified ·
1 Parent(s): caaf4f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -102,13 +102,13 @@ with gr.Blocks() as demo:
102
  state = gr.State(value=json.dumps({}))
103
 
104
  with gr.Row():
105
- record_button = gr.Audio(type="filepath", label="Speak Now")
106
  output_text = gr.Textbox(label="Response Text", interactive=False)
107
 
108
  with gr.Row():
109
  voice_output = gr.Audio(label="Response Audio", autoplay=True)
110
 
111
  # Automatically process audio when recording stops
112
- record_button.change(restaurant_voice_assistant, inputs=[record_button, state], outputs=[output_text, voice_output, state])
113
 
114
  demo.launch()
 
102
  state = gr.State(value=json.dumps({}))
103
 
104
  with gr.Row():
105
+ mic_button = gr.Audio(type="microphone", label="Speak Now")
106
  output_text = gr.Textbox(label="Response Text", interactive=False)
107
 
108
  with gr.Row():
109
  voice_output = gr.Audio(label="Response Audio", autoplay=True)
110
 
111
  # Automatically process audio when recording stops
112
+ mic_button.change(restaurant_voice_assistant, inputs=[mic_button, state], outputs=[output_text, voice_output, state])
113
 
114
  demo.launch()