import gradio as gr title = "FastSpeech2" description = "Gradio Demo for fairseq S^2: A Scalable and Integrable Speech Synthesis Toolkit. To use it, simply add your text, or click one of the examples to load them. Read more at the links below." article = "
fairseq S^2: A Scalable and Integrable Speech Synthesis Toolkit | Github Repo
" examples = [ ["Hello this is a test run","fastspeech2-en-200_speaker-cv4"] ] io1 = gr.Interface.load("huggingface/facebook/fastspeech2-en-200_speaker-cv4") io2 = gr.Interface.load("huggingface/facebook/fastspeech2-en-ljspeech") def inference(text): audio = io1(text) #audio = io2(text.strip()) return audio gr.Interface( inference, gr.inputs.Textbox(label="Input", lines=10), gr.outputs.Audio(label="Output"), examples=examples, article=article, title=title, description=description).launch(enable_queue=True)