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()