Spaces:
Runtime error
Runtime error
ahmedJaafari
commited on
Commit
·
c03e9ab
1
Parent(s):
d37fde4
Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ def speech_file_to_array_fn(path, max_seconds=120):
|
|
31 |
def inference(audio):
|
32 |
# read in sound file
|
33 |
# load dummy dataset and read soundfiles
|
34 |
-
ds = speech_file_to_array_fn(audio
|
35 |
# infer model
|
36 |
input_values = processor(
|
37 |
ds["speech"],
|
@@ -47,7 +47,7 @@ def inference(audio):
|
|
47 |
|
48 |
return output
|
49 |
|
50 |
-
inputs = gr.inputs.Audio(label="Input Audio", type="
|
51 |
outputs = gr.outputs.Textbox(label="Output Text")
|
52 |
title = "Annarabic Speech Recognition System"
|
53 |
description = 'Demo for <b>Annarabic ASR</b>. To use it, simply upload your audio, or click on one of the examples to load them. Only the 10 first seconds of the audio will be transcribed and GPU runtime is not used. For more information, contact Ahmed Jaafari via email: <a href = "mailto: a.jaafari@aui.ma">a.jaafari@aui.ma</a> or phone: <a href = "tel: +212658537105">+212658537105</a>.'
|
|
|
31 |
def inference(audio):
|
32 |
# read in sound file
|
33 |
# load dummy dataset and read soundfiles
|
34 |
+
ds = speech_file_to_array_fn(audio)
|
35 |
# infer model
|
36 |
input_values = processor(
|
37 |
ds["speech"],
|
|
|
47 |
|
48 |
return output
|
49 |
|
50 |
+
inputs = gr.inputs.Audio(label="Input Audio", type="filepath")
|
51 |
outputs = gr.outputs.Textbox(label="Output Text")
|
52 |
title = "Annarabic Speech Recognition System"
|
53 |
description = 'Demo for <b>Annarabic ASR</b>. To use it, simply upload your audio, or click on one of the examples to load them. Only the 10 first seconds of the audio will be transcribed and GPU runtime is not used. For more information, contact Ahmed Jaafari via email: <a href = "mailto: a.jaafari@aui.ma">a.jaafari@aui.ma</a> or phone: <a href = "tel: +212658537105">+212658537105</a>.'
|