Update app.py
Browse files
app.py
CHANGED
@@ -20,8 +20,8 @@ def function1(prompt):
|
|
20 |
file_name, headers = urllib.request.urlretrieve(data, "speech.wav")
|
21 |
sound = AudioSegment.from_wav(file_name)
|
22 |
mp3_file = "speech.mp3"
|
23 |
-
sound.export(mp3_file, format="mp3")
|
24 |
-
return
|
25 |
|
26 |
-
iface = gr.Interface(fn=function1, inputs="text", outputs=
|
27 |
iface.launch()
|
|
|
20 |
file_name, headers = urllib.request.urlretrieve(data, "speech.wav")
|
21 |
sound = AudioSegment.from_wav(file_name)
|
22 |
mp3_file = "speech.mp3"
|
23 |
+
file = sound.export(mp3_file, format="mp3")
|
24 |
+
return file
|
25 |
|
26 |
+
iface = gr.Interface(fn=function1, inputs="text", outputs="text")
|
27 |
iface.launch()
|