data(sheep, package = 'seewave')
# spectrogram(sheep)
zc = getPitchZc(sheep, pitchCeiling = 250)
plot(zc$detailed[, c('time', 'pitch')], type = 'b')
# Convert to a standard pitch contour sampled at regular time intervals:
pitch = getSmoothContour(
anchors = data.frame(time = zc$detailed$time, value = zc$detailed$pitch),
len = 1000, NA_to_zero = FALSE, discontThres = 0)
spectrogram(sheep, extraContour = pitch, ylim = c(0, 2))
if (FALSE) {
# process all files in a folder
zc = getPitchZc('~/Downloads/temp')
zc$summary
}
Run the code above in your browser using DataLab