Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ def greet(audio):
|
|
17 |
print(y)
|
18 |
|
19 |
mel = librosa.feature.melspectrogram(y=y, sr=sr)
|
20 |
-
|
21 |
img = scale_minmax(mel, 0, 255).astype(np.uint8)
|
22 |
img = 255-img
|
23 |
return img
|
|
|
17 |
print(y)
|
18 |
|
19 |
mel = librosa.feature.melspectrogram(y=y, sr=sr)
|
20 |
+
# #https://stackoverflow.com/questions/56719138/how-can-i-save-a-librosa-spectrogram-plot-as-a-specific-sized-image/57204349#57204349
|
21 |
img = scale_minmax(mel, 0, 255).astype(np.uint8)
|
22 |
img = 255-img
|
23 |
return img
|