I want to save mfcc spectrograms plot without displaying in Jupyter notebook output. I've tried to save mfcc spectrograms using following code, despite plots are deflecting in output.
import librosa.display
x, sr= librosa.load(file_name, sr= sr)
mfcc_feature= librosa.feature.mfcc(x, sr = sr)
fig= plt.figure(figsize=(12,8))
mfcc_image= librosa.display.specshow(mfcc_feature, sr= sr, y_axis= 'linear')
ax.axes.get_xaxis().set_visible(False)
ax.axes.get_yaxis().set_visible(False)
ax.set_frame_on(False)
ax.set_xlabel(None)
ax.set_ylabel(None)
#save the plots in testing folder
plt.savefig('mfcc_image.png')