This
preview
has intentionally blurred sections.
Sign up to view the full version.
Unformatted text preview: f_size = 1000; len = length(speech); num_F = floor(len/(f_size)); beg =1; en = f_size; for i = 1:num_F speech_frame = speech(beg:en); speech_frame1 = speech1(beg:en); theta = sum(abs(speech_frame))/length(speech_frame); energ(beg:en) = theta; beg = beg + f_size; en = en + f_size; figure; subplot(2,2,1); plot(speech_frame); xlabel('Time (seconds)'); ylabel('Amplitude'); title('One frame from a Male Speech Signal'); subplot(2,2,2); plot(speech_frame1); xlabel('Time (seconds)'); ylabel('Amplitude'); title('One frame from a Noisy Male Speech Signal'); subplot(2,2,3); N = 1028; X = abs(fft(speech_frame,N)); X = fftshift(X); F = [-N/2:N/2-1]/N; plot(F,X), xlabel('frequency / f s') grid; title('Approximate Spectrum of a speech frame with the FFT'); subplot(2,2,4); N = 1028; X = abs(fft(speech_frame1,N)); X = fftshift(X); F = [-N/2:N/2-1]/N; plot(F,X), xlabel('frequency / f s') grid; title('Approximate Spectrum of a Noisy speech frame with the FFT'); pause end e...
View
Full Document
- Spring '11
- Dr,Uche
- Phonation, len, The Signal, ('Amplitude');, Male Speech Signal
-
Click to edit the document details