Update app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,8 @@ def function1(prompt):
|
|
11 |
}).json()
|
12 |
data = response["data"][0]["name"]
|
13 |
data = "https://matthijs-speecht5-tts-demo.hf.space/file="+data
|
14 |
-
|
15 |
-
return
|
16 |
|
17 |
-
iface = gr.Interface(fn=function1, inputs="text", outputs="
|
18 |
iface.launch()
|
|
|
11 |
}).json()
|
12 |
data = response["data"][0]["name"]
|
13 |
data = "https://matthijs-speecht5-tts-demo.hf.space/file="+data
|
14 |
+
audio = AudioSegment.from_wav(data).export("output.mp3", format="mp3")
|
15 |
+
return audio
|
16 |
|
17 |
+
iface = gr.Interface(fn=function1, inputs="text", outputs=[gr.audio(label="Audio")])
|
18 |
iface.launch()
|