gibbonID: gibbonID

View source: R/gibbonID.R

gibbonIDR Documentation

gibbonID

Description

Function that extracts MFCCs as features from .wav files and plots them using UMAP. Points can be colored using affinity propagation clustering or by class labels. With the option to overlay spectrogram images.

Usage

gibbonID(
  input.dir,
  output.dir,
  min.freq,
  max.freq,
  pattern = ".wav",
  add.spectrograms = FALSE,
  class = "fixed",
  q.fixed = 0.1,
  win.avg = "standard",
  spec.ratio = 40
)

Arguments

input.dir

Directory where the .wav file clips are location

output.dir

Directory to save the spectrogram thumbnails.

min.freq

Minimum frequency (Hz) of signals of interest

max.freq

Maximum frequency (Hz) of signals of interest

pattern

Pattern to search fo rin input.dir; default is '.wav'

add.spectrograms

Logical; overlay spectrogram images

class

Option of 'affinity.adaptive', 'fixed.affinity' or 'no.clustering'; Specifies whether to do adaptive or fixed 'q' affinity propagation clustering, or to color points by class label.

q.fixed

If class=='fixed.affinity' specify value of 'q'. See ??apcluster for more details.

win.avg

Option of 'false','mean.sd' or 'standard'; whether to return MFCCs for each non-overlapping time window, calculate mean and SD over each MFCC or calculated MFCCs for a set number of time windows.

spec.ratio

Value to scale the spectrograms.

Examples

gibbonID(input.dir="/Users/denaclink/Desktop/RStudio Projects/gibbonR/data/MultipleSoundClasses/",output.dir="/Users/denaclink/Desktop/RStudio Projects/gibbonR/data/MultipleSoundClasses/Thumbnails/",win.avg='standard',add.spectrograms=TRUE,min.freq=400,max.freq=1600,class='no.clustering')

DenaJGibbon/gibbonR documentation built on Nov. 28, 2024, 2:52 a.m.