Inspiration

Passive acoustic recorders capture thousands of hours of forest and marine soundscapes, yet most tools stop at a raw species label and a probability score. Conservationists and field researchers need to know three things immediately: whether a call belongs to an IUCN-threatened species, whether an anthropogenic threat like a chainsaw or gunshot is occurring nearby, and how close or where the sound originated. I wanted to build the workbench I wished existed when reviewing field audio—a system that pairs multi-taxa species identification with conservation status enrichment and acoustic localization in one clear interface.

What it does

PingWild is a browser-based acoustic endangered species detector and conservation radar. You upload a WAV recording—whether a single-channel phone clip, a stereo field recording, or a multi-channel sensor array capture—and configure the acoustic medium (terrestrial air at 343 m/s or marine hydrophone water at 1480 m/s), confidence threshold, taxon filters (Aves, Mammalia, Amphibia, Insecta, Reptilia, Fish, and Threats), and optional GPS latitude, longitude, and week-of-year priors.

For 1- and 2-channel field recordings, PingWild identifies vocalizations, cross-references each species against a normalized 156,686-species IUCN Red List lookup to flag Critically Endangered (CR), Endangered (EN), Vulnerable (VU), Near Threatened (NT), or Data Deficient (DD) status, and estimates coarse proximity bands (Close under 15 m, Mid 15–50 m, Far over 50 m) from Direct-to-Reverberant Ratio and 99 percent spectral roll-off. For rare or non-avian species missing from pretrained labels, dropping reference WAV clips into data/custom_species/Genus_species/ activates few-shot matching via cosine similarity at or above 0.78. On the backend (POST /api/simulate and 3–4+ channel array uploads), PingWild also runs a 4-sensor Time Difference of Arrival (TDOA) pipeline with taxon-specific bandpass filtering and circular Kalman tracking, verified on real Kākāpō (Strigops habroptilus, IUCN CR) field recordings.

How I built it

The core backend (engine.py) is a typed Python 3.10+ module built on birdnet V3.0 ONNX, numpy, scipy, soundfile, and pyroomacoustics. Audio classification runs through MultiTaxaDetector, which passes in-memory audio arrays to BirdNET V3.0 ONNX, optionally queries the separate BirdNET V3.0 geo model to restrict candidates to species plausible at a given coordinate and week, and extracts L2-normalized 1280-dimensional embeddings for few-shot custom species matching.

Spatial localization applies 4th-order Butterworth bandpass filters tuned to each taxonomic class (80–2500 Hz for mammals and threats, 800–8000 Hz for birds, amphibians, reptiles, and fish, and 2500–14000 Hz for insects), estimates pairwise delays via Generalized Cross-Correlation with Phase Transform (GCC-PHAT) and 3-point parabolic sub-sample interpolation, and solves 2D source coordinates via Levenberg-Marquardt nonlinear least squares (scipy.optimize.least_squares) across a 30×30 meter square sensor perimeter. An AngularKalmanTracker smooths compass bearings across the 0°/360° North boundary using shortest signed angular residuals. The web layer uses FastAPI (server.py) serving a Neobrutalist HTML, CSS, and vanilla JavaScript frontend (static/) with zero Node.js build steps, backed by an automated pytest verification suite (test_engine.py).

Challenges we ran into

The first challenge was process management and unpacking BirdNET V3.0 outputs. BirdNET's default spawn worker mode re-imports the caller's main script, which crashed under pytest and web server runners until I configured BIRDNET_START_METHOD="fork" prior to importing birdnet. Unpacking AcousticPredictionResult across structured arrays, probability tensors, and geo-filtered species lists also required building a unified normalizer and label parser.

The second challenge was separating real stereo field recordings from multi-sensor arrays. A 2-channel stereo recording from Xeno-canto does not have the 30-meter baseline geometry of a 4-microphone array, and early pipeline logic checked recording duration rather than channel count. I separated 1–2 channel mono/stereo audio (routed to DRR and spectral roll-off proximity) from 3–4+ channel array captures (routed to full-length GCC-PHAT TDOA), and propagated medium-specific sound speeds (343 m/s vs. 1480 m/s) through the least-squares solver.

The third challenge was keeping angular tracking stable across North (0°/360°) without freezing on moving targets. Standard linear smoothing wraps backward across 180° when bearings cross from 358° to 2°, while omitting process noise caused the Kalman gain to decay toward zero over repeated frames. Adding process noise propagation and shortest signed angular residuals solved both.

Accomplishments that we're proud of

Verified end-to-end detection on real Kākāpō (Strigops habroptilus) audio, accurately flagging CR status under AVES alongside New Zealand geo-filtering.

Achieved sub-degree TDOA localization accuracy (under 1.0° bearing error and 0.5 m distance error) across mammals, birds, and insects in both air and underwater sound speeds, including across the 359°/1° North boundary.

Combined 156,686 normalized IUCN Red List entries with 1280-dimensional few-shot custom species matching so underrepresented taxa can be added with a few reference WAV files.

Kept the typed Python DSP/ML engine completely decoupled from the UI, allowing a clean migration from Streamlit to a FastAPI + Neobrutalist HTML/CSS/JS frontend without rewriting core math or tests.

What we learned

Testing against real wildlife recordings catches integration flaws that synthetic sine waves hide—pure tones pass TDOA math with 0.000° error while revealing nothing about real model thresholds, label formatting, or channel-count edge cases. I also learned that keeping signal processing and inference in a pure Python engine module makes UI iterations fast and low-risk.

What's next for PingWild

Next I want to add interactive spectrogram overlays with clickable time-window playback so users can inspect the exact frequency band behind each detection, expand few-shot reference templates for regional amphibians and marine mammals, and support batch scanning for multi-hour field recorder SD card dumps.

Development disclosure PingWild's core DSP functions, Red List CSV parser, and initial Streamlit prototype were built first as a modular Python codebase (engine.py, app.py, test_engine.py). During this development window, I fixed BirdNET V3.0 ONNX array prediction and geo-filter forwarding, added medium-aware sound speeds (343 m/s air and 1480 m/s water) and Kalman process-noise propagation, fixed multi-channel vs. mono/stereo routing, added end-to-end pytest coverage using real Kākāpō (Strigops habroptilus) recordings, and migrated the frontend from Streamlit to a FastAPI (server.py) + Neobrutalist HTML/CSS/JS (static/) interface while preserving the 4-sensor simulation endpoint at POST /api/simulate.

AI disclosure At runtime, species classification and 1280-dimensional audio embeddings run locally via the BirdNET V3.0 ONNX acoustic and geo models paired with deterministic signal processing (GCC-PHAT, Levenberg-Marquardt TDOA, and Kalman filtering). I used AI coding assistants during development to debug BirdNET V3.0 API integration, expand the pytest suite, and migrate the frontend from Streamlit to FastAPI + HTML/CSS/JS, verifying every change with local automated tests and real Kākāpō audio.

Built With

Share this project:

Updates

Submission history