Learn R Programming

soundgen (version 1.7.0)

estimateVTL: Estimate vocal tract length

Description

Estimates the length of vocal tract based on formant frequencies, assuming that the vocal tract can be modeled as a tube open at one end.

Usage

estimateVTL(
  formants,
  method = c("meanFormant", "meanDispersion", "regression")[3],
  speedSound = 35400,
  checkFormat = TRUE,
  plot = FALSE
)

Arguments

formants

formant frequencies in any format recognized by soundgen: a character string like aaui referring to default presets for speaker "M1"; a vector of formant frequencies like c(550, 1600, 3200); or a list with multiple values per formant like list(f1 = c(500, 550), f2 = 1200))

method

the method of estimating vocal tract length (see details)

speedSound

speed of sound in warm air, by default 35400 cm/s. Stevens (2000) "Acoustic phonetics", p. 138

checkFormat

if FALSE, only a list of properly formatted formant frequencies is accepted

plot

if TRUE, plots the regression line to illustrate the estimation of formant dispersion (method = "regression" only)

Value

Returns the estimated vocal tract length in cm.

Details

If method = 'meanFormant', vocal tract length (VTL) is calculated separately for each formant as \((2 * formant_number - 1) * speedSound / (4 * formant_frequency)\), and then the resulting VTLs are averaged. If method = 'meanDispersion', formant dispersion is calculated as the mean distance between formants, and then VTL is calculated as \(speed of sound / 2 / formant dispersion\). If method = 'regression', formant dispersion is estimated using the regression method described in Reby et al. (2005) "Red deer stags use formants as assessment cues during intrasexual agonistic interactions". For a review of these and other VTL-related summary measures of formant frequencies, refer to Pisanski et al. (2014) "Vocal indicators of body size in men and women: a meta-analysis". See also schwa for VTL estimation with additional information on formant frequencies.

See Also

schwa

Examples

Run this code
# NOT RUN {
estimateVTL(NA)
estimateVTL(500)
estimateVTL(c(600, 1850, 3100))
# Multiple measurements are OK
estimateVTL(
  formants = list(f1 = c(540, 600, 550),
  f2 = 1650, f3 = c(2400, 2550)),
  plot = TRUE)
# NB: this is better than averaging formant values. Cf.:
estimateVTL(
  formants = list(f1 = mean(c(540, 600, 550)),
  f2 = 1650, f3 = mean(c(2400, 2550))),
  plot = TRUE)

# Missing values are OK
estimateVTL(c(600, 1850, 3100, NA, 5000))
estimateVTL(list(f1 = 500, f2 = c(1650, NA, 1400), f3 = 2700), plot = TRUE)

# Note that VTL estimates based on the commonly reported 'meanDispersion'
# depend only on the first and last formant
estimateVTL(c(500, 1400, 2800, 4100), method = 'meanDispersion')
estimateVTL(c(500, 1100, 2300, 4100), method = 'meanDispersion') # identical
# ...but this is not the case for 'meanFormant' and 'regression' methods
estimateVTL(c(500, 1400, 2800, 4100), method = 'meanFormant')
estimateVTL(c(500, 1100, 2300, 4100), method = 'meanFormant') # much longer

# }
# NOT RUN {
# Compare the results produced by the three methods
nIter = 1000
out = data.frame(meanFormant = rep(NA, nIter), meanDispersion = NA, regression = NA)
for (i in 1:nIter) {
  # generate a random formant configuration
  f = runif(1, 300, 900) + (1:6) * rnorm(6, 1000, 200)
  out$meanFormant[i]    = estimateVTL(f, method = 'meanFormant')
  out$meanDispersion[i] = estimateVTL(f, method = 'meanDispersion')
  out$regression[i]     = estimateVTL(f, method = 'regression')
}
pairs(out)
cor(out)
# 'meanDispersion' is pretty different, while 'meanFormant' and 'regression'
# give broadly comparable results
# }

Run the code above in your browser using DataLab