DOI: 10.5061/dryad.v9s4mw72b
title: buzzfindr: Automating the detection of feeding buzzes in bat echolocation recordings

description: Quantification of bat communities and habitat heavily rely on non-invasive
 acoustic bat surveys the scope of which has greatly amplified with
 advances in remote monitoring technologies. Despite the unprecedented
 amount of acoustic data being collected, analysis of these data is often
 limited to simple species classification which provides little information
 on habitat function. Feeding buzzes, the rapid sequences of echolocation
 pulses emitted by bats during the terminal phase of prey capture, have
 historically been used to evaluate foraging habitat quality. Automated
 identification of feeding buzzes in recordings could benefit conservation
 by helping identify critical foraging habitat. I tested if detection of
 feeding buzzes in recordings could be automated with bat recordings from
 Ontario, Canada. Data were obtained using three different recording
 devices. The signal detection method involved sequentially scanning narrow
 frequency bands with the “Bioacoustics” R package signal detection
 algorithm, and extracting temporal and signal strength parameters from
 detections. Buzzes were best characterized by the standard deviation of
 the time between consecutive pulses, the average pulse duration, and the
 average pulse signal-to-noise ratio. Classification accuracy was highest
 with artificial neural networks and random forest algorithms. I compared
 each model’s receiver operating characteristic curves and random forest
 provided better control over the false-positive rate so it was retained as
 the final model. When tested on a new dataset, buzzfindr’s overall
 accuracy was 93.4% (95% CI: 91.5% - 94.9%). Overall accuracy was not
 affected by recording device type or species frequency group. Automated
 detection of feeding buzzes will facilitate their integration in the
 analytical workflow of acoustic bat studies to improve inferences on
 habitat use and quality.
description: I compiled data to train the feeding buzz classifier from
 recordings of bats made at five locations throughout Ontario, Canada, with
 three different recording devices over three years (see Table 1). Due to
 data sharing agreements, the precise locations of the recording sites
 cannot be provided. Recordings were from four bat species: Silver-haired
 Bat (<em>Lasionycteris noctivagans),</em> Big Brown Bat
 (<em>Eptesicus fuscus</em>), Hoary Bat (<em>Lasiurus
 cinereus</em>), and Little Brown Myotis (<em>Myotis
 lucifugus</em>). I compiled recordings of feeding buzzes and
 recordings without feeding buzzes by visually inspecting spectrograms of
 the recordings with program Audacity 2.4.2 (Boston, MA). Calls were
 selected irrespective of their signal-to-noise-ratio. I highlighted each
 observed feeding buzz from the approximate start of the buzz to just after
 the last perceived call in the buzz sequence and saved the highlighted
 sequence as a separate file. For recordings without buzzes, the entire
 file was used. I tested two instances of buzzfindr, one
 with the RF model and one with the ANN model, on a set of 889 recordings
 from nine new sites across Ontario, Canada (Table 2). Habitat and
 equipment deployment conditions were identical to those used for the
 training data. Each third of the test recordings was from a different
 recording device model and species frequency group (high-frequency /
 low-frequency) and buzz class (contained a buzz / lacked a buzz) were
 equally distributed within each device type.
description: # buzzfindr: Automating the detection of feeding buzzes in bat
 echolocation recordings Enclosed files consist of recordings used to train
 and test a classifier for automated detection of feeding buzzes in
 recordings of bat echolocation. The R script for developing and testing
 the classifier is also included. The associated manuscript is currently in
 revision phase. ## Description of the data and file structure The
 following excerpt from the manuscript in progress described the
 recordings: **Files for training the classifier-** I compiled data to
 train the feeding buzz classifier from recordings of bats made at five
 locations throughout Ontario, Canada, with three different recording
 devices over three years (see Table 1). The three devices were the Song
 Meter SM2BAT+ coupled with a SMX-US microphone, the Song Meter SM4BAT-FS
 coupled with a SMM-U2 microphone, and the Song Meter Mini Bat with an
 integrated microphone, all manufactured by Wildlife Acoustics Inc.
 Recordings were made with a 384 kHz sampling frequency. Due to data
 sharing agreements, the precise locations of the recording sites cannot be
 provided. Recordings were from four bat species: Silver-haired Bat
 (*Lasionycteris noctivagans),* Big Brown Bat (*Eptesicus fuscus*), Hoary
 Bat (*Lasiurus cinereus*), and Little Brown Myotis (*Myotis lucifugus*). I
 compiled recordings of feeding buzzes and recordings without feeding
 buzzes by visually inspecting spectrograms of the recordings with program
 Audacity 2.4.2 (Boston, MA). Calls were selected irrespective of their
 signal-to-noise-ratio. I highlighted each observed feeding buzz from the
 approximate start of the buzz to just after the last perceived call in the
 buzz sequence and saved the highlighted sequence as a separate file. For
 recordings without buzzes, the entire file was used. These are located in
 the "buzz training data" folder. Within this directory, there
 are 6 subdirectories that contain the .wav files used to train the
 classifier from 5 geographic locations. The subdirectories correspond to
 the 5 following locations identified in the manuscript: Site 1 =
 "buzzes_rr" Site 2 = "buzzes_tb" Site 3 =
 "buzzes_o" Site 4 = "buzzes_sp" Site 4 =
 "buzzes_spmylu" Site 5 = "buzzes_u" Each of these
 subfolders (e.g. buzzes*rr, buzzestb etc.) contains a further set of
 subf*olders ("buzzes", "buzzes.labels",
 "non_buzzes"). These are described below. "buzzes":
 Contains the .wav files of true buzzes used to train the classifier
 "non_buzzes": Contains the .wav files of non-buzzes used to
 train the classifier. "buzzes.labels": Contains the Audacity
 files and txt. files created from labelling the locations of buzzes within
 the .wav files in the "buzzes" folder. **Files for testing the
 classifier-** I tested two instances of buzzfindr, one with the RF model
 and one with the ANN model, on a set of 889 recordings from nine new sites
 across Ontario, Canada (Table 2). Habitat and equipment deployment
 conditions were identical to those used for the training data. Each third
 of the test recordings was from a different recording device model and
 species frequency group (high-frequency / low-frequency) and buzz class
 (contained a buzz / lacked a buzz) were equally distributed within each
 device type. These are located in the "buzz testing data"
 folder. Within this directory, there are 10 subdirectories. Nine of these
 contain the .wav files used to train the classifier from 9 new sites. The
 subdirectories correspond to the 9 new sites identified in the manuscript:
 Site 1 = "I" Site 2 = "RR" Site 3 = "Ch"
 Site 4 = "Sj" Site 5 = "Sa" Site 6 = "Sjj"
 Site 7 = "Cr" Site 8 = "E" Site 9 = "Ci" The
 subdirectory called "Compiled*_*test*_*files" contains the
 compiled testing data set from all nine sites. This compiled set was used
 to more easily test the classifier on a single set of files instead of
 having to loop through multiple directories. Each of these subfolders
 (e.g. buzzes*rr, buzzestb etc.) contains a further set of subf*olders
 ("buzzes", "non_buzzes"). These are described below.
 "buzzes": Contains the .wav files of true buzzes used to train
 the classifier "non_buzzes": Contains the .wav files of
 non-buzzes used to train the classifier. **Analysis scripts-** The R
 script for training and testing the classifier is also included. These are
 located in the directory called "Analysis scripts". Within this
 directory there are two files. The first is called "Buzz Data
 Extraction and Modelling (March 2024)" and contains the R script for
 developing and testing the classifier. The second file is called
 "Det_Param_Combo" and contains the results of the exercise
 undertaken to identify the best detection parameters to specify for the
 signal detection algorithm used in the classifier. A description of the
 methods used in the R function development and testing is provided in the
 manuscript. ## Sharing/Access information There is no other information.
 The associated manuscript is currently in submission phase. For additional
 information, contact the author:
 [joel.jameson@wsp.com](mailto:joel.jameson@wsp.com)