File size: 1,009 Bytes
382e37a
ff3a5da
2244bbb
 
 
 
 
 
02dba76
2244bbb
 
 
 
94780f8
2244bbb
 
 
 
 
 
 
382e37a
2244bbb
 
02dba76
2244bbb
 
 
ff3a5da
382e37a
2244bbb
 
 
 
 
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(source="microphone", type="filepath"),
        outputs="text",
        title="Faroese ASR Demo",
        description="Automatic Speech Recognition for Faroese"
    )

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

    lid_interface = gr.Interface(
        fn=identify_language,
        inputs=gr.Audio(source="microphone", 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()