ysharma's picture
ysharma HF staff
updte
ffd211a
raw
history blame
692 Bytes
import gradio as gr
fastspeech = gr.Interface.load("huggingface/facebook/fastspeech2-en-ljspeech")
def text2speech(text):
return fastspeech(text)
app = gr.Interface(fn=text2speech,
inputs=gr.inputs.Textbox(lines=5, label="Input Text"),
live=True,
description="Takes a text and reads it out to you.",
outputs=gr.outputs.Audio(type="file", label="Speech Answer"),
examples=["remotecontrol.jpg", "calculator.jpg", "cellphone.jpg"])
#def greet(name):
# return "Hello " + name + "!!"
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
#iface.launch()