Spaces:
Runtime error
Runtime error
simplify code
Browse files
app.py
CHANGED
@@ -25,12 +25,8 @@ def transcribe(audio, audio_microphone):
|
|
25 |
audio = audio_microphone if audio_microphone else audio
|
26 |
if convert(audio)== False:
|
27 |
return "The format must be mp3,wav and ogg"
|
28 |
-
|
29 |
-
result
|
30 |
-
for fname, transcription in zip(files, hf_model.transcribe(paths2audio_files=files)):
|
31 |
-
result= transcription[0]
|
32 |
-
result+= " Igisubiza"
|
33 |
-
return result
|
34 |
gradio_ui = gr.Interface(
|
35 |
fn=transcribe,
|
36 |
title="Kinyarwanda Speech Recognition",
|
|
|
25 |
audio = audio_microphone if audio_microphone else audio
|
26 |
if convert(audio)== False:
|
27 |
return "The format must be mp3,wav and ogg"
|
28 |
+
result= hf_model.transcribe(audio.name)
|
29 |
+
return result[0]
|
|
|
|
|
|
|
|
|
30 |
gradio_ui = gr.Interface(
|
31 |
fn=transcribe,
|
32 |
title="Kinyarwanda Speech Recognition",
|