clear all;
close all;
clc;
[y, fs] = audioread ('audioclip1.wav');
info = audioinfo ('audioclip1.wav');
sound (y, fs) ;
y4 = downsample (y, 4);
sound (y4, fs/4) ;
audiowrite('audioclip1-d4.wav', y4, fs/4) ;
info_d4 = audioinfo('audioclip1-d4.wav');
hd = lowpass2000_16k;
fvtool(hd);
yFilt = filter(hd, y);
sound(yFilt, fs) ;
audiowrite('audioclip1-filt.wav', yFilt, fs) ;
info_filtred = audioinfo('audioclip1-filt.wav');
yFilt4 = downsample (yFilt, 4);
sound (yFilt4, fs/4);
audiowrite('audioclip1-filt-d4.wav',yFilt4,fs/4);
info_filt_down = audioinfo('audioclip1-filt-d4.wav');