Spaces:
Build error
Build error
Mohamed Aymane Farhi
commited on
Commit
•
b867ef9
1
Parent(s):
731d3da
Add examples and description.
Browse files
app.py
CHANGED
@@ -35,12 +35,20 @@ def transcribe(audio_file_mic=None, audio_file_upload=None, language="eng"):
|
|
35 |
|
36 |
languages = list(processor.tokenizer.vocab.keys())
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
iface = gr.Interface(fn=transcribe,
|
39 |
inputs=[
|
40 |
gr.Audio(source="microphone", type="filepath"),
|
41 |
gr.Audio(source="upload", type="filepath"),
|
42 |
gr.Dropdown(choices=languages, label="Language", value="eng")
|
43 |
],
|
44 |
-
outputs=["textbox"]
|
|
|
|
|
45 |
)
|
46 |
iface.launch()
|
|
|
35 |
|
36 |
languages = list(processor.tokenizer.vocab.keys())
|
37 |
|
38 |
+
examples = [["kab_1.mp3", None, "kab"],
|
39 |
+
["kab_2.mp3", None, "kab"]]
|
40 |
+
|
41 |
+
description = '''Automatic Speech Recognition with [MMS](https://ai.facebook.com/blog/multilingual-model-speech-recognition/) (Massively Multilingual Speech) by Meta.
|
42 |
+
Supports [1162 languages](https://dl.fbaipublicfiles.com/mms/misc/language_coverage_mms.html). Read the paper for more details: [Scaling Speech Technology to 1,000+ Languages](https://arxiv.org/abs/2305.13516).'''
|
43 |
+
|
44 |
iface = gr.Interface(fn=transcribe,
|
45 |
inputs=[
|
46 |
gr.Audio(source="microphone", type="filepath"),
|
47 |
gr.Audio(source="upload", type="filepath"),
|
48 |
gr.Dropdown(choices=languages, label="Language", value="eng")
|
49 |
],
|
50 |
+
outputs=["textbox"],
|
51 |
+
examples=examples,
|
52 |
+
description=description
|
53 |
)
|
54 |
iface.launch()
|
kab_1.mp3
ADDED
Binary file (24.6 kB). View file
|
|
kab_2.mp3
ADDED
Binary file (39.2 kB). View file
|
|