Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Voice recognition %%
- load('dane.mat')
- y1 = y(:,1);
- load('dane2.mat')
- y2 = y(:,1);
- Y1 = fft(y1);
- N=length(y1); %number of samples
- f1=(0:N-1).*Fs/N; %define frequency vector
- Y2 = fft(y2);
- N=length(y2); %number of samples
- f2=(0:N-1).*Fs/N; %define frequency vector
- figure(5)
- subplot(2,1,1)
- plot(f1,abs(Y1))
- xlabel('Częstotliwość [Hz]');
- ylabel('|fft(x(t))|');
- xlim([0, Fs/2]);
- title('Spectrum of registered voice')
- subplot(2,1,2)
- plot(f2,abs(Y2))
- xlabel('Częstotliwość [Hz]');
- ylabel('|fft(x(t))|');
- xlim([0, Fs/2]);
- title('Spectrum of registered voice')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement