tommy24 commited on
Commit
73f476c
·
1 Parent(s): cbee267

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -21,8 +21,7 @@ def function1(prompt):
21
  file_name, headers = urllib.request.urlretrieve(data, "speech.wav")
22
  sound = AudioSegment.from_wav(file_name)
23
  sound.export("speech.mp3", format="mp3")
24
- audio_array = np.array(sound.get_array_of_samples())
25
- return audio_array
26
 
27
  iface = gr.Interface(fn=function1, inputs="text", outputs=gr.Audio(label="Audio", type="numpy"))
28
  iface.launch()
 
21
  file_name, headers = urllib.request.urlretrieve(data, "speech.wav")
22
  sound = AudioSegment.from_wav(file_name)
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()