Update app.py
Browse files
app.py
CHANGED
@@ -1,34 +1,27 @@
|
|
1 |
import gradio as gr
|
2 |
from asr import transcribe
|
3 |
from tts import synthesize_speech
|
4 |
-
from lid import
|
5 |
|
6 |
def main():
|
7 |
-
|
8 |
-
|
9 |
-
inputs=gr.Audio(type="filepath"),
|
10 |
-
outputs="text",
|
11 |
-
title="Faroese ASR Demo",
|
12 |
-
description="Automatic Speech Recognition for Faroese"
|
13 |
-
)
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
title="Faroese TTS Demo",
|
20 |
-
description="Text-to-Speech Synthesis for Faroese"
|
21 |
-
)
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
30 |
|
31 |
-
demo = gr.TabbedInterface([asr_interface, tts_interface, lid_interface], ["ASR", "TTS", "LID"])
|
32 |
demo.launch()
|
33 |
|
34 |
if __name__ == "__main__":
|
|
|
1 |
import gradio as gr
|
2 |
from asr import transcribe
|
3 |
from tts import synthesize_speech
|
4 |
+
from lid import identify
|
5 |
|
6 |
def main():
|
7 |
+
with gr.Blocks() as demo:
|
8 |
+
gr.Markdown("# Faroese ASR, TTS, and LID Demo")
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
+
with gr.Tab("ASR"):
|
11 |
+
gr.Audio(type="filepath", label=None)
|
12 |
+
gr.Button("Transcribe")
|
13 |
+
gr.Textbox()
|
|
|
|
|
|
|
14 |
|
15 |
+
with gr.Tab("TTS"):
|
16 |
+
gr.Textbox(label="Text Input")
|
17 |
+
gr.Button("Synthesize")
|
18 |
+
gr.Audio()
|
19 |
+
|
20 |
+
with gr.Tab("LID"):
|
21 |
+
gr.Audio(type="filepath", label=None)
|
22 |
+
gr.Button("Identify Language")
|
23 |
+
gr.Textbox()
|
24 |
|
|
|
25 |
demo.launch()
|
26 |
|
27 |
if __name__ == "__main__":
|