View source: R/praatScriptCentreOfGravity.R
praatScriptCentreOfGravity | R Documentation |
This function generates a Praat script fragment which can be passed as the praat.script parameter of processWithPraat, in order to extract one or more spectral centre of gravity (CoG) measurements.
praatScriptCentreOfGravity(powers = c(2), spectrum.fast = TRUE)
powers |
A vector of numbers specifying which powers to query for to extract, e.g. c(1.0,2.0). |
spectrum.fast |
Whether to use the 'fast' option when creating the spectrum object to query. |
A script fragment which can be passed as the praat.script parameter of processWithPraat
Other Praat-related functions:
praatScriptFastTrack()
,
praatScriptFormants()
,
praatScriptIntensity()
,
praatScriptPitch()
,
processWithPraat()
## Not run:
## Perform a search
results <- getMatches(labbcat.url, list(segment="I"))
## Get centres of gravity for all matches
cog <- processWithPraat(
labbcat.url,
results$MatchId, results$Target.segment.start, results$Target.segment.end,
praatScriptCentreOfGravity(powers=c(1.0,2.0)))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.