Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
import librosa
|
4 |
-
|
5 |
|
6 |
# import the librosa library for converting a Mel spectrogram image to audio
|
7 |
|
@@ -16,7 +16,7 @@ def mel_to_audio(mel_spectrogram):
|
|
16 |
output = 'output.wav'
|
17 |
sample = 44100
|
18 |
print (output)
|
19 |
-
|
20 |
return output
|
21 |
|
22 |
# create the gradio app
|
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
import librosa
|
4 |
+
from scipy.io.wavfile import write
|
5 |
|
6 |
# import the librosa library for converting a Mel spectrogram image to audio
|
7 |
|
|
|
16 |
output = 'output.wav'
|
17 |
sample = 44100
|
18 |
print (output)
|
19 |
+
write(output, sample, audio.astype(np.int16))
|
20 |
return output
|
21 |
|
22 |
# create the gradio app
|