0

I made a textgrid of the sentence "I quite like cheese a lot." and created three tiers and marked the sentence, word (cheese) and the nucleus of cheese to examine the f0. Then I used a script to extract f0 at different time points between 0 to 100%.

In a specific case, I segmented the word cheese from the sentence. I followed these steps:

Extract selected sounds (preserve time) → extract selected textgrid → then saved them both.

The resultant f0 data at different timepoints from 0% to 100% is now is different, not much but like .24 each time.

My question is why with the same data, once within a sentence and once standalone, I am getting differnet f0 readings?

Is there a way to resolve this issue to get exactly same result from them?

1
  • I quite like cheese OR I like cheese a lot.
    – Lambie
    Sep 6, 2023 at 16:19

1 Answer 1

0

I sort of replicated this, and noticed from the pitch listings that the start point of defined pitch differed a little bit: 15.552548 sec vs. 15.551652, therefore the F0 value also differed a little (148.186206 vs. 148.921995). This suggests that "times" are not exactly preserved (which it could be if Praat kept track of sample number as an integer and computed time as a function of sample rate). In the editor, you can take textgrids out of the picture and just manually select start and end – the reported time of the first defined pitch value will differ by a tiny amount depending on the "exact" time of the selection. Reading this and this, about the pitch tracking algorithm, may explain the underlying theory of F0 extraction and how the output value depends on a "window". I also believe that a quest for "absolute accuracy" is doomed, and you have to accept values that are "good enough".

You don't say whether this is an editor script or a object menu script, but it should be an object menu script. Praat interpolates values between computed pitch frames which is why you can request a pitch value at a very exact time that lands between two computed pitch values. If you don't like the small variation that results from this, you should use frame numbers and extract by frame. Likewise, you may specify a seemingly precise time of a sample, but there isn't necessarily an actual sample there. You can determine an integral sample number based on desired time (as reflected in your earlier cursor click), then convert sample number to floating-point time. Also remember that you can control the time step of pitch analysis so that you can get the desired time granularity

ADDENDUM

The best way to get exactly the same pitch values, which is to use the entire un-extracted file, create a pitch object with To Pitch (ac) filling in exactly the same parameters each time (in a script), then get F0 based on frames via List values in all frames: "Hertz" or "Get value in frame". In either case you have to work out the relationship between time and frame using Get frame number from time. The time step value determines how often Praat computes a pitch value. When you ask for a time that is between two actual measurements, it interpolates the answer.

Praat requires a broad window for pitch extraction, therefore if you want to get pitch between 1.2355267841 seconds and 1.8544353569767, you cannot extract just the interval from 1.2355267841 seconds and 1.8544353569767, you have to start further left and go further right, in order for Praat to "pick up the pattern" in the part of interest. This paper explains some of the technical why.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.