Description Usage Arguments Details Value Examples
Finds syllables and bursts. Syllables are defined as continuous segments with ampiltude above threshold. Bursts are defined as local maxima in amplitude envelope that are high enough both in absolute terms (relative to the global maximum) and with respect to the surrounding region (relative to local mimima). See the vignette on acoustic analysis for details.
1 2 3 4 5 |
x |
path to a .wav file or a vector of amplitudes with specified samplingRate |
samplingRate |
sampling rate of |
windowLength, overlap |
length (ms) and overlap (
window used to produce the amplitude envelope, see
|
shortestSyl |
minimum acceptable length of syllables, ms |
shortestPause |
minimum acceptable break between syllables, ms.
Syllables separated by less time are merged. To avoid merging, specify
|
sylThres |
amplitude threshold for syllable detection (as a proportion of global mean amplitude of smoothed envelope) |
interburst |
minimum time between two consecutive bursts (ms). If
specified, it overrides |
interburstMult |
multiplier of the default minimum interburst
interval (median syllable length or, if no syllables are detected, the same
number as |
burstThres |
to qualify as a burst, a local maximum has to be at least
|
peakToTrough |
to qualify as a burst, a local maximum has to be at
least |
troughLeft, troughRight |
should local maxima be compared to the trough on the left and/or right of it? Default to TRUE and FALSE, respectively |
summary |
if TRUE, returns only a summary of the number and spacing of syllables and vocal bursts. If FALSE, returns a list containing full stats on each syllable and bursts (location, duration, amplitude, ...) |
plot |
if TRUE, produces a segmentation plot |
savePath |
full path to the folder in which to save the plots. Defaults to NA |
... |
other graphical parameters passed to |
The algorithm is very flexible, but the parameters may be hard to optimize by
hand. If you have an annotated sample of the sort of audio you are planning
to analyze, with syllables and/or bursts counted manually, you can use it for
automatic optimization of control parameters (see
optimizePars
. The defaults are the results of just such
optimization against 260 human vocalizations in Anikin, A. & Persson, T.
(2017). Non-linguistic vocalizations from online amateur videos for emotion
research: a validated corpus. Behavior Research Methods, 49(2): 758-771.
If summary = TRUE
, returns only a summary of the number and
spacing of syllables and vocal bursts. If summary = FALSE
, returns a
list containing full stats on each syllable and bursts (location, duration,
amplitude, ...).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | sound = soundgen(nSyl = 8, sylLen = 50, pauseLen = 70,
pitchAnchors = list(time = c(0, 1), value = c(368, 284)), temperature = 0.1,
noiseAnchors = list(time = c(0, 67, 86, 186), value = c(-45, -47, -89, -120)),
rolloff_noise = -8, amplAnchorsGlobal = list(time = c(0, 1), value = c(120, 20)))
spectrogram(sound, samplingRate = 16000, osc = TRUE)
# playme(sound, samplingRate = 16000)
s = segment(sound, samplingRate = 16000, plot = TRUE)
# accept quicker and quieter syllables
s = segment(sound, samplingRate = 16000, plot = TRUE,
shortestSyl = 25, shortestPause = 25, sylThres = .6)
# look for narrower, sharper bursts
s = segment(sound, samplingRate = 16000, plot = TRUE,
shortestSyl = 25, shortestPause = 25, sylThres = .6,
interburstMult = 1)
# just a summary
segment(sound, samplingRate = 16000, summary = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.