bsnr estimates signal-to-noise ratio for bioacoustic detections from hydrophone recordings. It is designed for tonal and frequency-modulated calls — whale song, upcalls, clicks — against broadband ocean noise.
Seven SNR methods span bioacoustic, speech, and engineering approaches. All methods support calibrated acoustic levels (dB re 1 µPa), click removal, and batch processing with optional parallel execution.
bsnr was developed at the Australian Antarctic Division to support reproducible SNR reporting in published cetacean acoustics research.
Features
- Seven SNR methods
- Annotation trimming
- Three display types
- Calibrated dB re 1 µPa
- Click removal
- Batch + parallel
- Published-data examples
- Comprehensive tests
Design philosophy
Verified against known results
Analytical tests verify known SNR values. Includes comparison with and predominantly faithful reproduction of published SNR estimates.
Well documented
Explicit parameter names with tab-completion. Diagnostic plots show
exactly what was measured. resolvedParams
helps record which parameters were actually used.
Aspiring to shared standards
Shared conventions across functions make it easier to learn one part and apply that knowledge elsewhere. Where possible, outputs align with Tethys and ASA passive acoustic metadata standards.
Quick start
Documentation
Getting Started
Installation, your first SNR estimate, building annotation structs, choosing a method, batch processing, calibration, and troubleshooting.
→SNR Methods & Display Types
All seven methods illustrated on synthetic and real Antarctic baleen whale recordings, with spectrogram, time series, and histogram displays. Covers calibrated levels, click removal, and STFT parameter guidance.
→Development Journey
How bsnr came to be, what worked and what didn't, and an honest account of co-developing research software with an AI assistant over many sessions.
→Architecture
Codebase structure, call chain, annotation format, and the key design decisions that shaped the tool — including what was tried and rejected.
Published-data examples
Antarctic Blue Whale D-calls — Casey 2019
SNR for 1319 analyst true-positive D-call detections using the merged signal window (max of analyst and detector duration). A systematic parameter search found r = 0.48 vs paper snrLurton — the original values could not be reproduced exactly from the published supplemental material.
→ABW A/B/Z Calls — IWC-SORP Annotated Library
ABZ call SNR across 8 sites from the open-access IWC-SORP Annotated Library. CDF distributions per site replicate Figure 8 of the paper, with r = 0.61–0.82 vs original values.
→Seasonal SNR & Noise Level — Kerguelen 2014
Calibrated seasonal SNR and noise level distributions replicating Figure 5. Demonstrates the spectrogramSlices method with acoustic calibration; noise levels match within 0.5 dB after bandwidth correction.
→Parallel Processing Guide — Common Ground ABZ Calls
How to characterise a 50k-annotation workload, measure parpool startup overhead, identify the CPU vs I/O bottleneck, and choose parallel settings. Worker sweep shows 7.7× speedup at 30 workers on Casey 2019.
→Antarctic Blue Whale ABZ Calls — Common Ground
Per-observer SNR for 1289 adjudicated detections from five observers (three analysts, two automated detectors). bsnr gives r = 0.96 vs paper values — a close match given bsnr uses a fixed batch nfft where the original used per-annotation nfft.
Required toolboxes
MATLAB R2021b+, Signal Processing Toolbox, soundFolder, annotatedLibrary.