Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,20 +4,14 @@ import gradio as gr
|
|
| 4 |
model = EncoderASR.from_hparams("speechbrain/asr-wav2vec2-dvoice-wolof")
|
| 5 |
|
| 6 |
def transcribe(audio):
|
| 7 |
-
|
| 8 |
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
demo = gr.Interface(fn=transcribe, inputs=["file"], outputs="text", ## , "microphone"
|
| 17 |
-
title="Transcription audio en wolof latin by Papa Séga",
|
| 18 |
-
description="Ce modèle transcrit un fichier audio en wolof en texte en utilisant l'alphabet latin.",
|
| 19 |
-
input_label="Audio en wolof",
|
| 20 |
-
output_label="Transcription alphabet latin"
|
| 21 |
-
)
|
| 22 |
|
| 23 |
demo.launch()
|
|
|
|
| 4 |
model = EncoderASR.from_hparams("speechbrain/asr-wav2vec2-dvoice-wolof")
|
| 5 |
|
| 6 |
def transcribe(audio):
|
| 7 |
+
return model.transcribe_file(audio.name)
|
| 8 |
|
| 9 |
+
demo = gr.Interface(
|
| 10 |
+
fn=transcribe,
|
| 11 |
+
inputs=gr.Audio(source="upload", type="file", label="Audio en wolof"),
|
| 12 |
+
outputs=gr.Textbox(label="Transcription alphabet latin"),
|
| 13 |
+
title="Transcription audio en wolof latin by PSW",
|
| 14 |
+
description="Ce modèle transcrit un fichier audio en wolof en texte en utilisant l'alphabet latin."
|
| 15 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
demo.launch()
|