How to save mfcc of audio frames in image format to provide input to cnn?
7 views (last 30 days)
Show older comments
Shilpa Sonawane
on 17 Jan 2023
Commented: Shilpa Sonawane
on 23 Jan 2023
I have used spectrogram command to view mfcc. I used command "savsas" to sava it in image format. But when i oped it, fig shows xlabel, ylable and colorbar also. i need only imagein terms of pixel. i also tried imwrite, but it was black & white image.
0 Comments
Accepted Answer
Amey Waghmare
on 20 Jan 2023
Hi,
As per my understanding, you have used ‘spectogram’ to view mfcc of audio frame and saved it as an image using ‘saveas’. However, you want to save only the spectrogram without any colorbar, xlabel and ylabel.
In order to remove the xlabel and ylabel, you can hide the axes by setting the ‘Visible’ property of the axes to ‘off’. You can use ‘colorbar’ command to delete the colorbar in the axes. Then you can save the spectrogram by using ‘saveas’, as shown below,
set(gca, 'Visible', 'off')
colorbar('off');
saveas(gcf, 'mfcc.jpg')
This will save the spectrogram without the colorbar and axes.
For more information, please refer to the following documentation,
I hope this resolves the issue.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!