# NOT RUN {
## define the LaBB-CAT URL
labbcat.url <- "https://labbcat.canterbury.ac.nz/demo/"
## Perform a search
results <- getMatches(labbcat.url, list(segment="I"))
## get F1 and F2 for the mid point of the vowel
formants <- processWithPraat(
labbcat.url,
results$MatchId, results$Target.segment.start, results$Target.segment.end,
praatScriptFormants())
## get first 3 formants at three points during the sample, the mean, min, and max
## pitch, the max intensity, and the CoG using powers 1 and 2
acoustic.measurements <- processWithPraat(
labbcat.url,
results$MatchId, results$Target.segment.start, results$Target.segment.end,
paste(
praatScriptFormants(c(1,2,3), c(0.25,0.5,0.75)),
praatScriptPitch(get.mean=TRUE, get.minimum=TRUE, get.maximum=TRUE),
praatScriptIntensity(),
praatScriptCentreOfGravity(powers=c(1.0,2.0))),
window.offset=0.5)
## execute a custom script loaded form a file
acoustic.measurements <- processWithPraat(
labbcat.url,
results$MatchId, results$Target.segment.start, result$Target.segment.end,
readLines("acousticMeasurements.praat"))
# }
Run the code above in your browser using DataLab