ECEA108L Expt5 Castillo
ECEA108L Expt5 Castillo
ECEA108L Expt5 Castillo
Syd T. Castillo
Leonardo Valiente
ECEA108L – B15
17/01/2021
Castillo, Syd T. 17/01/2021
Fs = 11025;
CASTILLO = audiorecorder(Fs, 16, 2, -1);
disp('Start Speaking.')
recordblocking(CASTILLO, 5);
disp('End of Recording.')
data = getaudiodata(CASTILLO);
plot(data)
play(CASTILLO)
audiowrite('SydCastillo.wav',SydAudio,Fs)
I never thought that we can use MATLAB to record our voices. Moreover,
we can see the frequency to better visualize the frequency of your
voice.
Castillo, Syd T. 17/01/2021
complex = fft(SydAudio,512);
freq = (0:255)/256*Fs/2;
plot(freq,abs(complex(1:256)),'r')
xlabel('Frequency'), ylabel('Amplitude')
Syntax:
Fs = 11025;
[B,A] = fir1(6,[1000]/(Fs/2),'low')
zplane(B,A,'r')
lines = findall(gcf,'type','line');
lines(1).Color = 'r';
lines(2).Color = 'r';
lines(3).Color = 'r';
[a,n] = impz(B,A)
stem(n,a,'r')
[h g] = freqz(B,A)
plot(g*Fs/(2*pi),abs(h),'r')
Castillo, Syd T. 17/01/2021
Syntax:
Fs = 11025;
LPFD = filter(B,A,SydAudio)
LPFM = fft(LPFD,512);
freq = (0:255)/256*Fs/2;
plot(freq,abs(LPFM(1:256)),'r')
xlabel('Frequency'), ylabel('Amplitude')
Castillo, Syd T. 17/01/2021
Syntax:
Fs = 11025;
[B,A] = fir1(6,[2500]/(Fs/2),'high')
zplane(B,A)
lines = findall(gcf,'type','line');
lines(1).Color = 'r';
lines(2).Color = 'r';
lines(3).Color = 'r';
[a,n] = impz(B,A)
stem(n,a,'r')
[h g] = freqz(B,A)
plot(g*Fs/(2*pi),abs(h),'r')
Castillo, Syd T. 17/01/2021
The sound of my voice is much more softer and deeper than the original
sound.
Syntax:
Fs = 11025;
[B,A] = fir1(15,[2000 3000]/(Fs/2),'bandpass')
zplane(B,A)
lines = findall(gcf,'type','line');
lines(1).Color = 'r';
lines(2).Color = 'r';
lines(3).Color = 'r';
[a,n] = impz(B,A)
stem(n,a,'r')
[h g] = freqz(B,A)
plot(g*Fs/(2*pi),abs(h),'r')
Castillo, Syd T. 17/01/2021
The wave form shows an increase approximately 1.1 kHz and decreases
approximately 2.5 kHz.
Syntax:
Fs = 11025;
BPFD = filter(B,A,SydAudio)
BPFM = fft(BPFD,512);
freq = (0:255)/256*Fs/2;
plot(freq,abs(BPFM(1:256)),'r')
xlabel('Frequency'), ylabel('Amplitude')
Castillo, Syd T. 17/01/2021
The audio that I hear has more background noise the voice’s volume is
decreasing.
Syntax
Fs = 11025;
[B,A] = fir1(20,[800 2200]/(Fs/2),'stop')
zplane(B,A)
lines = findall(gcf,'type','line');
lines(1).Color = 'r';
lines(2).Color = 'r';
lines(3).Color = 'r';
[a,n] = impz(B,A)
stem(n,a,'r')
[h g] = freqz(B,A)
plot(g*Fs/(2*pi),abs(h),'r')
Castillo, Syd T. 17/01/2021
The audio is becoming deeper and unwanted frequencies are filtered and
generates a distinct sound.
Proof:
Castillo, Syd T. 17/01/2021
Castillo, Syd T. 17/01/2021