Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,16 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
from tts import synthesize_speech
|
|
|
3 |
|
4 |
def main():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
tts_interface = gr.Interface(
|
6 |
fn=synthesize_speech,
|
7 |
inputs="text",
|
@@ -10,7 +19,15 @@ def main():
|
|
10 |
description="Text-to-Speech Synthesis for Faroese"
|
11 |
)
|
12 |
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
demo.launch()
|
15 |
|
16 |
if __name__ == "__main__":
|
|
|
1 |
import gradio as gr
|
2 |
+
from asr import transcribe
|
3 |
from tts import synthesize_speech
|
4 |
+
from lid import identify_language
|
5 |
|
6 |
def main():
|
7 |
+
asr_interface = gr.Interface(
|
8 |
+
fn=transcribe,
|
9 |
+
inputs=gr.Audio(type="filepath"),
|
10 |
+
outputs="text",
|
11 |
+
title="Faroese ASR Demo",
|
12 |
+
description="Automatic Speech Recognition for Faroese"
|
13 |
+
)
|
14 |
tts_interface = gr.Interface(
|
15 |
fn=synthesize_speech,
|
16 |
inputs="text",
|
|
|
19 |
description="Text-to-Speech Synthesis for Faroese"
|
20 |
)
|
21 |
|
22 |
+
lid_interface = gr.Interface(
|
23 |
+
fn=identify_language,
|
24 |
+
inputs=gr.Audio(type="filepath"),
|
25 |
+
outputs="label",
|
26 |
+
title="Language Identification",
|
27 |
+
description="Identify the language of the spoken input"
|
28 |
+
)
|
29 |
+
|
30 |
+
demo = gr.TabbedInterface([asr_interface, tts_interface, lid_interface], ["ASR", "TTS", "LID"])
|
31 |
demo.launch()
|
32 |
|
33 |
if __name__ == "__main__":
|