Spaces:
Runtime error
Runtime error
add new code
Browse files
app.py
CHANGED
@@ -32,4 +32,14 @@ def transcribe(audio):
|
|
32 |
stop = timeit.default_timer()
|
33 |
return "message"+ transcription[0]+ "\nfilename"+ audio.name+"\nTrancriptionTime"+stop-start
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
gradio_ui.launch()
|
|
|
32 |
stop = timeit.default_timer()
|
33 |
return "message"+ transcription[0]+ "\nfilename"+ audio.name+"\nTrancriptionTime"+stop-start
|
34 |
|
35 |
+
gradio_ui = gr.Interface(
|
36 |
+
fn=transcribe,
|
37 |
+
title="Kinyarwanda Speech Recognition",
|
38 |
+
description="Upload an audio clip or record from browser using microphone, and let AI do the hard work of transcribing.",
|
39 |
+
article = """
|
40 |
+
This demo showcases the pretrained model from deepspeech.
|
41 |
+
""",
|
42 |
+
inputs=[gr.inputs.Audio(label="Upload Audio File", type="file", optional=True), gr.inputs.Audio(source="microphone", type="file", optional=True, label="Record from microphone")],
|
43 |
+
outputs=[gr.outputs.Textbox(label="Recognized speech")]
|
44 |
+
)
|
45 |
gradio_ui.launch()
|