Update app.py
Browse files
app.py
CHANGED
|
@@ -2,14 +2,14 @@ import gradio as gr
|
|
| 2 |
|
| 3 |
from gradio_client import Client, handle_file
|
| 4 |
|
| 5 |
-
client = Client("Ghana-NLP/
|
| 6 |
|
| 7 |
demo = gr.Blocks()
|
| 8 |
|
| 9 |
-
title = "# Khaya AI: Speech Recognition for Languages
|
| 10 |
|
| 11 |
description = """
|
| 12 |
-
<b>How to use:</b> Speak through mic in either Krio, Temne, Mende or English (or upload a file of same)
|
| 13 |
"""
|
| 14 |
|
| 15 |
def transcribe_wrapper_fn(audio, LANG):
|
|
@@ -23,13 +23,13 @@ def transcribe_wrapper_fn(audio, LANG):
|
|
| 23 |
|
| 24 |
mic_transcribe = gr.Interface(
|
| 25 |
fn=transcribe_wrapper_fn,
|
| 26 |
-
inputs=[gr.Audio(sources=["microphone"], type="filepath"), gr.Dropdown(["
|
| 27 |
outputs=gr.Textbox(),
|
| 28 |
)
|
| 29 |
|
| 30 |
file_transcribe = gr.Interface(
|
| 31 |
fn=transcribe_wrapper_fn,
|
| 32 |
-
inputs=[gr.Audio(sources=["upload"], type="filepath"), gr.Dropdown(["
|
| 33 |
outputs=gr.Textbox(),
|
| 34 |
)
|
| 35 |
|
|
|
|
| 2 |
|
| 3 |
from gradio_client import Client, handle_file
|
| 4 |
|
| 5 |
+
client = Client("Ghana-NLP/Southern-Ghana-ASR")
|
| 6 |
|
| 7 |
demo = gr.Blocks()
|
| 8 |
|
| 9 |
+
title = "# Khaya AI: Speech Recognition for Languages of Southern Ghana"
|
| 10 |
|
| 11 |
description = """
|
| 12 |
+
<b>How to use:</b> SPECIFY INPUT LANGUAGE & Speak through mic in either Krio, Temne, Mende or English (or upload a file of same)
|
| 13 |
"""
|
| 14 |
|
| 15 |
def transcribe_wrapper_fn(audio, LANG):
|
|
|
|
| 23 |
|
| 24 |
mic_transcribe = gr.Interface(
|
| 25 |
fn=transcribe_wrapper_fn,
|
| 26 |
+
inputs=[gr.Audio(sources=["microphone"], type="filepath"), gr.Dropdown(["Asante Twi","Dangme","Ewe","Fante","French","Ga","Nzema","African English"], value="Asante Twi", multiselect=False, label="Language", info="Select Lamguage")],
|
| 27 |
outputs=gr.Textbox(),
|
| 28 |
)
|
| 29 |
|
| 30 |
file_transcribe = gr.Interface(
|
| 31 |
fn=transcribe_wrapper_fn,
|
| 32 |
+
inputs=[gr.Audio(sources=["upload"], type="filepath"), gr.Dropdown(["Asante Twi","Dangme","Ewe","Fante","French","Ga","Nzema","African English"], value="Asante Twi", multiselect=False, label="Language", info="Select Lamguage")],
|
| 33 |
outputs=gr.Textbox(),
|
| 34 |
)
|
| 35 |
|