Update app.py
Browse files
app.py
CHANGED
@@ -18,6 +18,7 @@ def greet(audio):
|
|
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
|
|
|
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 |
+
mel = np.log(mel + 1e-9)
|
22 |
img = scale_minmax(mel, 0, 255).astype(np.uint8)
|
23 |
img = 255-img
|
24 |
return img
|