Update app.py
Browse files
app.py
CHANGED
@@ -124,8 +124,9 @@ with gr.Blocks() as demo:
|
|
124 |
state = gr.State(None)
|
125 |
output = gr.Textbox(label="Detected Emotions (Last 5 chunks)", lines=2)
|
126 |
|
|
|
127 |
audio_input = gr.Audio(
|
128 |
-
|
129 |
type="numpy",
|
130 |
streaming=True,
|
131 |
label="Microphone Input",
|
@@ -142,4 +143,5 @@ with gr.Blocks() as demo:
|
|
142 |
demo.load(lambda: None, None, state)
|
143 |
demo.close(cleanup, state, state)
|
144 |
|
145 |
-
|
|
|
|
124 |
state = gr.State(None)
|
125 |
output = gr.Textbox(label="Detected Emotions (Last 5 chunks)", lines=2)
|
126 |
|
127 |
+
# Updated Audio component syntax for Gradio 4.39.0
|
128 |
audio_input = gr.Audio(
|
129 |
+
sources=["microphone"],
|
130 |
type="numpy",
|
131 |
streaming=True,
|
132 |
label="Microphone Input",
|
|
|
143 |
demo.load(lambda: None, None, state)
|
144 |
demo.close(cleanup, state, state)
|
145 |
|
146 |
+
# Launch with a smaller queue size for faster updates
|
147 |
+
demo.queue(max_size=10).launch(share=True)
|