Spaces:
Running
Running
Commit
·
a5e687b
1
Parent(s):
834fcc4
Added basic app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from streaming_stt_nemo import Model
|
| 2 |
+
|
| 3 |
+
import gradio as gr
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
model = Model()
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
def transcribe(audio):
|
| 12 |
+
text = model.stt_model.transcribe([audio])[0]
|
| 13 |
+
return text
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
gr.Interface(
|
| 19 |
+
fn=transcribe,
|
| 20 |
+
inputs=[
|
| 21 |
+
gr.Audio(source="microphone", type="filepath")
|
| 22 |
+
],
|
| 23 |
+
outputs=[
|
| 24 |
+
"textbox"
|
| 25 |
+
],
|
| 26 |
+
live=True).launch()
|