Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from speechbrain.pretrained import EncoderASR
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
model = EncoderASR.from_hparams("speechbrain/asr-wav2vec2-dvoice-wolof")
|
5 |
+
|
6 |
+
def transcribe(audio):
|
7 |
+
return model.transcribe_file(audio.name)
|
8 |
+
|
9 |
+
|
10 |
+
demo = gr.Interface(fn=transcribe, inputs="file", outputs="text")
|
11 |
+
|
12 |
+
demo.launch()
|