Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,12 +13,12 @@ def transcribe(stream, new_chunk):
|
|
13 |
stream = np.concatenate([stream, y])
|
14 |
else:
|
15 |
stream = y
|
16 |
-
return stream, transcriber({"sampling_rate": sr, "raw": stream})["text"]
|
17 |
|
18 |
demo = gr.Interface(
|
19 |
transcribe,
|
20 |
["state", gr.Audio(sources=["microphone"], streaming=True)],
|
21 |
-
["state", "text"],
|
22 |
live=True,
|
23 |
)
|
24 |
|
|
|
13 |
stream = np.concatenate([stream, y])
|
14 |
else:
|
15 |
stream = y
|
16 |
+
return stream, transcriber({"sampling_rate": sr, "raw": stream})["text"] , new_chunk
|
17 |
|
18 |
demo = gr.Interface(
|
19 |
transcribe,
|
20 |
["state", gr.Audio(sources=["microphone"], streaming=True)],
|
21 |
+
["state", "text", gr.Audio(label="Output", streaming=True, autoplay=True)],
|
22 |
live=True,
|
23 |
)
|
24 |
|