You are on page 1of 1

fs=10000 Hz ‫قراءة ملف صوتي واالستماع إليه بفرض أن‬

N=256;
df = 20;
filename=input('Enter file name : ');
[sound fs]=wavread(filename);
wavplay(sound, fs);
sig=sound(1:N,1)';
fc=2*1000/fs;

Mic=dsp.AudioRecorder
frame=step(Mic)
[x,fs]=audioread('say me.wma');
N = size (x,1);
ts=1/fs;
tmax =(N-1)*ts;
t=0:ts:tmax;
figure
plot(t,x);
f=-fs/2:fs/(N-1):fs/2;
z=fftshift(fft(x));
plot(f,z);
figure
plot(f,abs(z));
n=4;
beginfreq=700 / (fs/2);
endfreq = 2000/(fs/2);
[b,a]=butter(n,[beginfreq,endfreq],'ban
dpass');
fout = 10*filter (b,a,x);
p=audioplayer (fout,fs);
p.play;

You might also like