File size: 1,001 Bytes
7a86b92
9d60183
 
 
382e37a
9d60183
 
 
 
 
 
 
 
a7f185d
9d60183
 
 
e469d0f
9d60183
 
 
382e37a
9d60183
 
 
 
 
 
 
 
 
 
2244bbb
 
9d60183
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import gradio as gr
from asr import transcribe
from tts import synthesize_speech
from lid import identify_language

def main():
    asr_interface = gr.Interface(
        fn=transcribe,
        inputs=gr.Audio(type="filepath"),
        outputs="text",
        title="Faroese ASR Demo",
        description="Automatic Speech Recognition for Faroese"
    )

    tts_interface = gr.Interface(
        fn=synthesize_speech,
        inputs="text",
        outputs=gr.File(label="Download Generated Audio"),
        title="Faroese TTS Demo",
        description="Text-to-Speech Synthesis for Faroese"
    )

    lid_interface = gr.Interface(
        fn=identify_language,
        inputs=gr.Audio(type="filepath"),
        outputs="label",
        title="Language Identification",
        description="Identify the language of the spoken input"
    )

    demo = gr.TabbedInterface([asr_interface, tts_interface, lid_interface], ["ASR", "TTS", "LID"])
    demo.launch()

if __name__ == "__main__":
    main()