Scalable Animal Sound Detection: Hybrid Machine Learning Approaches for Real-World Bioacoustic Applications
Scalable Animal Sound Detection: Hybrid Machine Learning Approaches for Real-World Bioacoustic Applications
Trapp Sunday Kayuni,Kelvin Amos Nicodemas
TLDR
A hybrid classification framework that systematically compares classical and deep learning paradigms for animal sound recognition is presented, affirm the enhanced representational capacity of self-supervised transformer architectures for bioacoustic classification and provide practical guidance for automated wildlife monitoring systems.
Abstract
Animal bioacoustics has emerged as an indispensable tool for biodiversity monitoring and ecosystem assessment, enabling non-invasive observation of wildlife populations across diverse habitats. Traditional acoustic classification systems employ handcrafted features such as Mel-Frequency Cepstral Coefficients (MFCCs) with classical machine learning classifiers, achieving reasonable performance in controlled environments but struggling with environmental noise, species vocalization variability, and cross-habitat generalization. This paper presents a hybrid classification framework that systematically compares classical and deep learning paradigms for animal sound recognition. A Random Forest classifier trained on 40-dimensional handcrafted acoustic features—encompassing spectral, temporal, and energy-based descriptors—establishes an interpretable baseline enabling feature importance analysis.
A fine-tuned Wav2Vec2 transformer model serves as the deep learning counterpart, learning hierarchical representations directly from raw waveforms without manual preprocessing. Both approaches were evaluated on a diverse dataset spanning 15 animal species across birds, mammals, and amphibians using accuracy, precision, recall, F1-score, and confusion matrix analysis. Results demonstrate that Wav2Vec2 substantially outperforms the feature-based baseline, achieving 92.75% test accuracy compared to 78.62% for Random Forest—an improvement of 14.13 percentage points. Per-class analysis reveals dramatic gains for acoustically challenging species, with the transformer model achieving near-perfect classification (F1 > 96%) for multiple categories where Random Forest struggled. These findings affirm the enhanced representational capacity of self-supervised transformer architectures for bioacoustic classification and provide practical guidance for automated wildlife monitoring systems. The complete codebase, trained models, and evaluation protocols are publicly available to support reproducibility and future research.