This function takes vectors of volume and duration thresholds and uses them to detect above-threshold sounds. The duration threshold is evaluated cumulatively across the entire recording (i.e. not necessarily contiguously). Default for the threshold pair are optimised values from a labelled data set

detect_sound(
  soundfile,
  start_time = 0,
  volume_threshold = 700,
  duration_threshold = 0.06
)

Arguments

soundfile

A wave file name

start_time

A start time (default 0)

volume_threshold

A (vector of) volume threshold(s)

duration_threshold

A (vector of) duration threshold(s) of same size

Value

a logical vector of same length as the threshold vectors