Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ def scale_minmax(X, min=0.0, max=1.0):
|
|
8 |
X_std = (X - X.min()) / (X.max() - X.min())
|
9 |
X_scaled = X_std * (max - min) + min
|
10 |
return X_scaled
|
11 |
-
def greet(
|
12 |
print("np array" , name)
|
13 |
#step 0 revert the things done to get back to the raw spectrogram
|
14 |
# i
|
@@ -25,7 +25,7 @@ def greet(sampleR,name):
|
|
25 |
return (sampleR,S_inv)
|
26 |
#mel -> audio
|
27 |
|
28 |
-
iface = gr.Interface(fn=greet, inputs=gr.Image(label="Mel spectrogram", image_mode="L"),
|
29 |
iface.launch()
|
30 |
|
31 |
#Read melpectogram of npy file
|
|
|
8 |
X_std = (X - X.min()) / (X.max() - X.min())
|
9 |
X_scaled = X_std * (max - min) + min
|
10 |
return X_scaled
|
11 |
+
def greet(name):
|
12 |
print("np array" , name)
|
13 |
#step 0 revert the things done to get back to the raw spectrogram
|
14 |
# i
|
|
|
25 |
return (sampleR,S_inv)
|
26 |
#mel -> audio
|
27 |
|
28 |
+
iface = gr.Interface(fn=greet, inputs=gr.Image(label="Mel spectrogram", image_mode="L"), outputs=gr.Audio(label="Audio"))
|
29 |
iface.launch()
|
30 |
|
31 |
#Read melpectogram of npy file
|