{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

example_speechFFT - %This program looks at the fft of...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
% %This program looks at the fft of voiced and unvoiced portions of speech % %Reseting the Program clear all; close all; %Reading the file [speech, fs] = wavread('Roos_Umah_Nour.wav'); %Converting the x axis from sample numbers to time x = 1:length(speech); t = x./fs; t %******************************************************* %Plotting the file %******************************************************* figure; plot(t, speech); xlabel('Time (seconds)'); ylabel('Amplitude'); title('Waveform for a Male Speech Signal with a Sampling Frequenvy of 16KHZ'); axis([0 max(t) -1 1]); %******************************************************* % %******************************************************* %Displaying voiced and unvoiced speech segments %******************************************************* %Detecting voiced and unvoiced segments based on energy % %Computing the frame-by-frame energy of the signal f_size = 128; len = length(speech); num_F = floor(len/(f_size)); beg =1; en = f_size; for i = 1:num_F speech_frame = speech(beg:en); theta = sum(abs(speech_frame))/length(speech_frame); energ(beg:en) = theta; beg = beg + f_size; en = en + f_size; end energ(length(energ)+1:len) = energ(length(energ)); e %Obtaining voiced and unvoiced segments based on energy voiced_i = find(energ >= 0.075);
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern