gibbonR | R Documentation |
This function identifies sound events using band-limited energy summation and then classifies the sound events using a trained support vector machine or random forest algorithm.
{input, input.type='list', feature.df,model.type.list=c("SVM"), tune = FALSE, target.signal = "female.gibbon",
short.wav.duration=300,min.freq = 400, max.freq = 2000,
noise.quantile.val=0.5, minimum.separation =5, n.windows = 9, num.cep = 12, spectrogram.window =1600,
pattern.split = ".wav", min.signal.dur = 4, maximum.separation =1,max.sound.event.dur = 12,
probability.thresh.svm = 0.75, probability.thresh.rf = 0.75, wav.output = "TRUE", output.dir = getwd(),
swift.time=TRUE,time.start=6,time.stop=12, write.table.output=TRUE,verbose=TRUE, random.sample='NA'}
input |
Either full path to directory containing .wav files, a list of .wav files, or a the path to a single .wav file |
input.type |
Either 'directory', 'list' or 'wav' |
feature.df |
Data frame of features from labeled sound files; first column must be class labels |
model.type.list |
Which machine learning model to use; SVM or RF |
tune |
Logical; if want to use 'tune' function for SVM; NOTE: for large datasets adds significant computing time |
target.signal |
Labeled signal(s) of interest from training data (feature.df); can include multiple classes. |
short.wav.duration |
Duration (s) to divide longer sound file to increase processing efficiency |
min.freq |
Minimum frequency (Hz) of signal of interest |
max.freq |
Maximum frequency (Hz) of signal of interest |
noise.quantile.val |
A quantile value between 0 to 1 for the band energy summation |
minimum.separation |
The minimum number of consecutive time windows that signals must be separated by to be considered a separate sound event |
n.windows |
Number of time windows to calculate for MFCCs |
num.cep |
Number of cepstra coefficients to calculate for MFCCs |
spectrogram.window |
Window length for spectrogram analysis (input to spectro fuction from 'seewave') |
pattern.split |
Pattern to find and remove to create full sound file name; currently set to ".wav" |
min.signal.dur |
The minimum duration (s) sound events must be to be considered sound events |
maximum.separation |
The maximum number of consecutive time windows that signals must be separated by to be considered a separate sound event |
max.sound.event.dur |
The maximum duration (s) sound events must be to be considered sound events; NOTE this only happens when writing text file |
probability.thresh.svm |
Probability threshold (provided by SVM) to be considered as target signal |
probability.thresh.rf |
Probability threshold (provided by RF) to be considered as target signal |
wav.output |
Logical; output .wav files of detections in specified directory |
output.dir |
Specified output directory; set to current working directory |
swift.time |
If file name is in structure recorder_YYYYMMDD_HHMMSS can subset files based on specific times |
time.start |
Time recordings start (hour) |
time.stop |
Time recordings stop (hour) |
write.table.output |
Logical; write Raven selection tables to output directory |
verbose |
Logical; print out steps |
random.sample |
If a random subset of files in a directory are desired specify a value, otherwise 'NA' |
If write.table.output=TRUE writes a .txt file for each sound file with detections
If write.table.output=TRUE writes a .txt file for each sound file with detections
MFCCFunction(input.dir = "FocalRecordings",min.freq = 400,max.freq=2500)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.