Home task 1

% use of wavrecord function close all clear all %sampling for 2 seconds Fs = 11025; y = wavrecord(2*Fs, Fs, 2, 'int16'); wavplay(y, Fs) %changing samplg frequency of wavrecord %to 8K Fs = 8000; y = wavrecord(2*Fs, Fs, 2, 'int16'); %2 is for stereo wavplay(y, Fs) %to 16K Fs = 16000; y = wavrecord(2*Fs, Fs, 2, 'int16'); wavplay(y, Fs) %to 32K Fs = 32K; y = wavrecord(2*Fs, Fs, 2, 'int16'); %2 is for stereo wavplay(y, Fs)

%changing samplg frequency of wavplay %to 8K Fs = 11025; y = wavrecord(2*Fs, Fs, 2, 'int16'); wavplay(y, 8000) %to 16K Fs = 11025; y = wavrecord(2*Fs, Fs, 2, 'int16'); wavplay(y, 16000) %to 32K Fs = 11025; y = wavrecord(2*Fs, Fs, 2, 'int16'); wavplay(y, 32000)

voice = wavrecord(5*Fs.'r--') ratio=sum(y(1:3.4KHZ range and the ratio is 53. plot (1:Fs/2. hold on plot(1:3.Fs.8%.4*1000))/sum(y(1:Fs/2)) The figure below shows that the red and blue overlap in only 0-3. y=abs(fft(voice)).So the human voice consists of only the frequency components between 3-4 KHz. .4*1000).4*1000.y(1:Fs/2)).Home Task 2 close all clear all %sampling frequency Fs = 16000.y(1:3.1).

Sign up to vote on this title
UsefulNot useful