Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
import speech_recognition as sr
|
| 3 |
import requests
|
| 4 |
import json
|
| 5 |
import os
|
|
@@ -243,13 +242,18 @@ with gr.Blocks(title="Voice Agent - Gradio MCP Hackathon", theme=gr.themes.Soft(
|
|
| 243 |
""")
|
| 244 |
|
| 245 |
with gr.Tab("π€ Voice Mode"):
|
| 246 |
-
gr.Markdown("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 247 |
with gr.Row():
|
| 248 |
with gr.Column():
|
| 249 |
audio_input = gr.Audio(
|
| 250 |
sources=["microphone"],
|
| 251 |
type="filepath",
|
| 252 |
-
label="ποΈ
|
| 253 |
format="wav"
|
| 254 |
)
|
| 255 |
voice_button = gr.Button("π Process Voice Input", variant="primary", size="lg")
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
import requests
|
| 3 |
import json
|
| 4 |
import os
|
|
|
|
| 242 |
""")
|
| 243 |
|
| 244 |
with gr.Tab("π€ Voice Mode"):
|
| 245 |
+
gr.Markdown("""
|
| 246 |
+
**ποΈ Voice Input Demo**
|
| 247 |
+
- Record your voice using the microphone
|
| 248 |
+
- Requires OpenAI API key for speech-to-text
|
| 249 |
+
- Or use the Text Mode tab for full functionality
|
| 250 |
+
""")
|
| 251 |
with gr.Row():
|
| 252 |
with gr.Column():
|
| 253 |
audio_input = gr.Audio(
|
| 254 |
sources=["microphone"],
|
| 255 |
type="filepath",
|
| 256 |
+
label="ποΈ Record your voice",
|
| 257 |
format="wav"
|
| 258 |
)
|
| 259 |
voice_button = gr.Button("π Process Voice Input", variant="primary", size="lg")
|