File size: 811 Bytes
d42f4c5
 
ca97dd1
d42f4c5
ca97dd1
 
 
 
 
 
 
 
4387840
ca97dd1
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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="text",
                   live=True,
                   description="Takes a snapshot of an object, identifies it, and then tell you what it is. \n Intended use is to help the visually impaired. Models and     dataset used is listed on the linked models and dataset", 
                   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()