File size: 1,020 Bytes
7a86b92 87ca653 9d60183 87ca653 382e37a 9d60183 cb292d6 9d60183 2184cfb 0898110 1405f92 9d60183 87ca653 0898110 87ca653 d20a6f9 9d60183 2244bbb 2184cfb |
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 |
import gradio as gr
from asr import transcribe
from tts import synthesize_speech
from lid import identify_language
def main():
tts_interface = gr.Interface(
fn=synthesize_speech,
inputs="text",
outputs="audio",
title="Teldutala",
description="Royn føroysku teldutaluna hjá Meta"
)
asr_interface = gr.Interface(
fn=transcribe,
inputs=gr.Audio(type="filepath"),
outputs="text",
title="Talukennari",
description="Royn føroyska talukennaran hjá Meta"
)
lid_interface = gr.Interface(
fn=identify_language,
inputs=gr.Audio(type="filepath"),
outputs="label",
title="Máleyðmerkjari",
description="Her kanst tú snakka tað málið, tú vilt, og máleyðmerkjarin gitir, hvat mál tað er."
)
demo = gr.TabbedInterface([tts_interface, asr_interface, lid_interface], ["Teldutala", "Talukennari", "Máleyðmerkjari"])
demo.launch()
if __name__ == "__main__":
main()
|