Reputation: 25
I am using this code to visualize the melspectogram and save the image
spec = librosa.feature.melspectrogram(y=y,sr=sr,n_mels=128 )
plt.figure(figsize=(12, 6))
spec = librosa.amplitude_to_db(spec, ref=np.max)
librosa.display.specshow(spec, sr=sr, y_coords=None,y_axis='log',fmax=20000)
plt.savefig('spectogram.png')
I am unable to remove the Y-axis labels, ticks, and the label of the axis and save them.
Upvotes: 2
Views: 1180