praatScriptFormants.Rd
This function generates a Praat script fragment which can be passed as the praat.script parameter of processWithPraat, in order to extract selected formants.
A vector of integers specifying which formants to extract, e.g c(1,2) for the first and second formant.
A vector of numbers (0 <= sample.points <= 1) specifying multiple points at which to take the measurement. The default is a single point at 0.5 - this means one measurement will be taken halfway through the target interval. If, for example, you wanted eleven measurements evenly spaced throughout the interval, you would specify sample.points as being c(0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0).
Time step in seconds, or 0.0 for 'auto'.
Maximum number of formants.
Maximum formant value (Hz) for all speakers, or for female speakers, if max.formant.male is also specified.
Maximum formant value (Hz) for male speakers, or NULL to use the same value as max.formant.
Name of the LaBB-CAT participant attribute that contains the participant's gender - normally this is "participant_gender".
The value that the gender.attribute has when the participant is male.
Window length in seconds.
Pre-emphasis from (Hz)
The praatScriptFastTrack function provides an alternative to this function which uses the FastTrack Praat plugin for formant analysis.
if (FALSE) {
## Get all tokens of the KIT vowel
results <- getMatches(labbcat.url, list(segment="I"))
## Get the first 3 formants at three points during the vowel
formants <- processWithPraat(
labbcat.url,
results$MatchId, results$Target.segment.start, results$Target.segment.end,
window.offset=0.025,
praatScriptFormants(formants=c(1,2,3),
sample.points=c(0.25,0.5,0.75)))
}