Create app.py
Browse files
app.py
CHANGED
@@ -1,18 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
-
from speechbrain.pretrained import EncoderASR
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
def speech_recognize(file):
|
8 |
-
text = asr_model.transcribe_file(file)
|
9 |
-
return text
|
10 |
-
|
11 |
-
|
12 |
-
iface = gr.Interface(
|
13 |
-
fn=speech_recognize,
|
14 |
-
inputs=gr.inputs.Audio(source="microphone", type='filepath'),
|
15 |
-
outputs="text",
|
16 |
-
)
|
17 |
-
iface.launch()
|
18 |
|
|
|
|
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
+
def greet(name):
|
4 |
+
return "Hello " + name + "!!"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
+
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
7 |
+
iface.launch()
|