LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How would you find the pitch period of a sound signal?

Hi
 
I have a few questions and i would like if somebody could help me even with the smallest comment on this.
How would someone be successfully estimate the pitch period (fundamental frequency) of a 5 second sound file?How would you successfully distinguish the voiced from the unvoiced parts and how would you make sure you dont mix voiced/unvoiced sections? Finally how can you find the exact points where the pitch is at its peak throughout the signal?
 
Any help/comment/suggesion would be much appreciated
0 Kudos
Message 1 of 17
(5,231 Views)
madgreek,
 
I'd give you 50 stars for sticking with it on this one. Under the waveform measurements there is an extract single tone information.vi. Looks like you have to convert the sound file into a waveform. I'm not sure about the rest of it yet.
 
Also search fundamental in the examples. There are three harmonic analyzer examples that mention fundamental frequency.

Message Edited by unclebump on 04-17-2007 05:38 AM

0 Kudos
Message 2 of 17
(5,223 Views)
Hey unclebump
 
The thing is i am able to find the different periods thoughout the signal but, since i am sub-dividing the whole signal into smaller same size chunks and evaluating those for any periodicity, some times voiced and unvoiced chunks are mixed, meaning a sub-chunk might start in the middle of a voiced section of the signal and end in the middle of an unvoiced. That is where i am wrong. I am just looking for any other methods that someone else might have used before or another approach.
 
Last night i found where voiced/unvoiced parts start and finish in the signal. They are of different size.Would the FFT still be able to work (for detecting the period) for different sizes of the signal or will i have to break them down to same size i.e. 256 or 512?
 
If anybody could help
0 Kudos
Message 3 of 17
(5,208 Views)
Hello madgreek,

It sounds as if you are able to analyze and locate period information throughout the signal. If I understand you correctly the problem arises when you divide the signal because you may detect unwanted frequencies from voice / non-voice overlap. Why is it that you are dividing up this signal? I do not know of a method that you could use to discriminate voiced from unvoiced chunks. So unless you have a way to be sure that these sections will not overlap, you may not be able to divide up the signal and still accurately detect your desired frequencies.

Could you provide more information for the goal of this application? We may be able to suggest a different method for the task that you're building. Thanks.

Mike D.
0 Kudos
Message 4 of 17
(5,191 Views)
Hello Mike
 
The ultimate goal is to time and pitch scale the signal by accurately detecting the pitch periods for the voiced parts thoughout the signal, but this is not what i am asking here.
 
Lets say i know exactly where my voiced/unvoiced sections start. I am using the Cepstrum algorithm which is simply the ifft {log[abs fft (x)]} to detect the pitch periods for these voiced pieces.
My question right now is this, these segments are not a power of 2 so by using the fft in labview, it automatically does the DFT for it?
Will it have any difference from using the FFT?If a voiced segment is lets say 4000 samples long, shall i do a DFT of size 4000 or break it down into smaller sizes?
Most of these voiced segments have various fundamental frequencies in them and i want to distinguish each one and use their pitch period to subdivide that voiced segment further down.
I dont know if i am clear about this but my question mostly focuses on the use of FFT and how to distinguish the different frequencies and how to find out where exactly do they start and end .
 
 
0 Kudos
Message 5 of 17
(5,189 Views)
Hello madgreek,

Unfortunately I am not familiar with this algorithm that you have mentioned. However, because the FFT is essentially an efficient algorithm to compute the DFT of your signal, the results you receive should be as you expect.

I am also not sure why you would have to break down the sample into smaller sizes. You should be able to extract all of the contained frequencies in your original signal by analyzing the spectrum of that signal. When you say that you would like to find out where exactly these signals start and end, are you trying to determine where these start and end in time? I am not quite sure how this could be done. Unfortunately I may not be too much help with the algorithm, but I'm more than happy to help with any of the LabVIEW. Please post back if we can provide you with any additional assistance. Thanks.

Mike D.
0 Kudos
Message 6 of 17
(5,173 Views)
Hello Mike
 
Yes i want to find where they start and end in time so then i can find the peaks (pitch periods) and get them windowed for further processing.
 
Kind regards
Madgreek
0 Kudos
Message 7 of 17
(5,171 Views)
Hello Madgreek,

After some thought I think I may have come up with an algorithm for what we have discussed. Basically, you are interested in knowing the time intervals over which you can observe any given frequency in your signal. As you had suggested, you can examine small windows of your signal and perform FFTs on each of the small windows to determine what frequency content is contained in that window. By examining all of the windows, you will see when particular frequencies are prevalent in the original signal. You'd want to use the smallest allowable window to give you the most resolution, but one that is large enough to cover an entire period of the lowest frequency (so that you don't miss this frequency).

I have attached an example program that performs this operation. The example performs this analysis on an array that represents audio data. I am basically performing multiple FFTs (for each window) and stacking these FFTs in time to form a 3D plot. By examining the 3D plot, I can then see when in time my frequencies of interest are at their peaks. Rather than graphing these plots, you may work out a different algorithm for programmatically determining and logging these peaks and times. I hope this is what you were looking for!
0 Kudos
Message 8 of 17
(5,158 Views)

Hello Mike

Is it possible to post the vi in Labview 7 please?If you have it, otherwise a screenshot of it so i can look at it and rebuild it. Thank you for all your help and time

Alex

0 Kudos
Message 9 of 17
(5,154 Views)
Sure, Alex. I have attached the VI saved back for LabVIEW version 7.0. I hope this helps! Thanks,

Mike D.
Message 10 of 17
(5,131 Views)