Update app.py
Browse files
app.py
CHANGED
@@ -18,10 +18,8 @@ def function1(prompt):
|
|
18 |
}).json()
|
19 |
data = response["data"][0]["name"]
|
20 |
data = "https://matthijs-speecht5-tts-demo.hf.space/file="+data
|
21 |
-
file_name, headers = urllib.request.urlretrieve(data, "speech.
|
22 |
-
|
23 |
-
sound.export("speech.mp3", format="mp3")
|
24 |
-
return file_name
|
25 |
|
26 |
iface = gr.Interface(fn=function1, inputs="text", outputs=gr.Audio(label="Audio", type="numpy"))
|
27 |
iface.launch()
|
|
|
18 |
}).json()
|
19 |
data = response["data"][0]["name"]
|
20 |
data = "https://matthijs-speecht5-tts-demo.hf.space/file="+data
|
21 |
+
file_name, headers = urllib.request.urlretrieve(data, "speech.mp3")
|
22 |
+
return data
|
|
|
|
|
23 |
|
24 |
iface = gr.Interface(fn=function1, inputs="text", outputs=gr.Audio(label="Audio", type="numpy"))
|
25 |
iface.launch()
|