How to save audio in .mat file
26 次查看(过去 30 天)
显示 更早的评论
Hi I'm a beginner in matlab and i want to save audio in .mat file how can i do that?
0 个评论
回答(1 个)
KSSV
2017-4-20
y = rand(10000,1) ; % some random signal
Fs = 1100 ; % som frequency
save demo.mat ; % save the data into .mat file
clear y Fs % remove the variables
load demo.mat ;
filename = 'handel.wav';
audiowrite(filename,y,Fs);
[y,Fs] = audioread('handel.wav');
sound(y,Fs);
% clear sound
5 个评论
Shreyan Basu Ray
2021-10-5
@Soulaimene Jaoua change the extension from .wav to .mp3 by simply renaming the extension and then create the .mat file
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!