nakas commited on
Commit
87d610a
1 Parent(s): 4649e10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
  import numpy as np
3
  import librosa
4
- import soundfile as sf
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
- sf.write(output, audio, sample)
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