Documentation Guides: Scientific Methods • User Guide
crvscience-sonowing v1.1.0)Native safe-Rust bat echolocation and avian vocalization sonic/ultrasonic waveform, STFT spectrogram, MFCC/UMAP clustering, harmonic stack, live mic, and soundscape analyzer
docs/SCIENTIFIC_METHODS.md)docs/USER_GUIDE.md)# GitHub
git clone https://github.com/bpwhite/crvscience-sonowing.git
# Codeberg
git clone https://codeberg.org/crvscience/crvscience-sonowing.git
# GitLab
git clone https://gitlab.com/bpcwhite/crvscience-sonowing.git
# SourceForge
git clone https://git.code.sf.net/p/crv-science-apps/code -b crvscience-sonowing
sonowing v1.1.0)
Native safe-Rust (#![forbid(unsafe_code)]) desktop GUI workstation (eframe / egui 0.31) and headless parallel CLI (clap 4.5 + rayon 1.10) for Chiropteran (bat) ultrasonic echolocation and Avian (bird) nocturnal flight call (NFC) & song waveform, spectrogram, unsupervised MFCC/UMAP clustering, harmonic stack tracking, live microphone capture, and soundscape analysis.
docs/USER_GUIDE.mddocs/SCIENTIFIC_METHODS.mdLICENSE)src/dsp.rs, src/gui.rs):1 / win_sum normalization to real-valued DC (b = 0) and Nyquist (b = N/2) DFT bins (eliminating the +6.02 dB inflation present in naive 2 / win_sum scaling) while using 2 / win_sum for interior complex-conjugate pairs.(sqrt(2) - 1)^(1/4) for exact -3.01 dB zero-phase filtfilt cutoffs and pads edges with Gustafsson (1996) odd-symmetric reflection + steady-state initial filter states.65,536-sample FFT with 16,384-sample guard aprons) in hilbert_envelope for click-free envelopes across chunk boundaries.(frame, bin) energy per screen pixel column/row across 256-entry perceptually uniform LUTs (Magma, Viridis, Inferno, Cividis, Inverted Grayscale), preventing brief FM pulses from dropping out when zoomed out.src/soundscape_indices.rs, src/ultrasonic_audio.rs):NDSI anthrophony exactly to Kasten et al. (2012) 1,000–2,000 Hz, sets ADI/AEI occupancy threshold to -50.0 dBFS, and uses half-open frequency-bin intervals [kb0, kb1_excl) so shared boundary bins are never double-counted.0.45 * out_rate to prevent ultrasonic foldover aliasing.src/mfcc_cluster.rs, src/harmonic_tracker.rs, src/live_mic.rs):24-filter Mel/Ultrasonic Log-Mel + DCT-II (13 static + 5 delta-MFCC + 4 contour features), fuzzy simplicial UMAP layout, k-Means++ with Silhouette K* selection, f0..5f0 harmonic overtone tracking, and 192–384 kHz live mic capture.All single-key shortcuts ignore input while typing in text fields (!ctx.wants_keyboard_input()).
| Input | Action |
|---|---|
Space |
Play / Pause audible ultrasonic auditioning |
Left / Right |
Step backward / forward through detected calls & auto-center view window |
0 or Z |
Reset time & frequency spectrogram/waveform zoom |
1 / 2 / 3 |
Switch audition mode (1: TE 10x, 2: TE 20x, 3: Digital Heterodyne) |
Shift + Primary-Drag |
Draw spectrogram caliper (Δt ms, f_lo–f_hi kHz, slope kHz/ms, peak dBFS) |
Primary-Click / Drag |
Move cursor playhead & select overlapping call (outside Shift-caliper) |
Secondary / Middle-Drag |
Pan spectrogram time and frequency viewport |
Scroll Wheel |
Cursor-anchored zoom (Shift: frequency only, Ctrl: time only) |
Double-Click |
Reset full time & frequency zoom |
F1 |
Toggle 20-species acoustic reference key & shortcut modal |
F5 / F9 |
Quick save / open saved SQLite WAL sessions |
Esc |
Close active modal -> Clear spectrogram caliper |
Drag & Drop |
Drop .wav, .zc, .zcf, or .sonoworkset.json onto window |
# Run full unit & integration test suite (use --no-default-features on headless Linux without ALSA)
cargo test --all-targets
# Launch native desktop GUI workstation
cargo run --release
# Inspect a WAV or ZC recording headlessly with Raven Pro selection table & CSV summary
cargo run --release -- inspect samples/MYLU_Willamette_Demo_250kHz.wav \
--raven-out mylu.Table.1.selections.txt \
--csv-out mylu_summary.csv
# Parallel batch scan across a directory of field recordings
cargo run --release -- batch recordings_dir/ --out-dir sonowing_batch_out --snr-db 12.0
# Capture 4 seconds of live microphone audio (or --simulated 192 kHz nocturnal stream)
cargo run --release -- record-mic --seconds 4.0 --simulated --output live_capture.wav
# Transcode ultrasonic WAV to audible 48 kHz WAV (te10 | te20 | heterodyne | fdiv)
cargo run --release -- transcode samples/MYLU_Willamette_Demo_250kHz.wav \
--mode heterodyne --carrier-khz 41.0 --output mylu_het.wav
# Generate synthetic calibrated preset WAV (B1..B4, A1..A4, M1)
cargo run --release -- synth-demo --preset B1 --output demo_b1.wav
| CLI Flag / Subcommand | Default | Purpose |
|---|---|---|
--open <PATH> |
— | Open .wav or .zc file directly in GUI |
--skip-hub |
false |
Bypass Startup Calibration Hub directly into workstation |
--db <PATH> |
sonowing_sessions.sqlite3 |
SQLite WAL session repository path |
--headless-screenshot <PATH> |
— | Render 1600x1000 offscreen RGBA PNG (--screenshot-view 1\|2\|3) |
inspect <FILE> |
--snr-db 12.0 |
Headless STFT, morphometrics, harmonics, MFCC/UMAP, Raven/CSV/SQLite |
batch <DIR> |
--out-dir sonowing_batch_out |
Rayon parallel batch directory scan |
record-mic |
--seconds 3.0 --ultrasonic |
Capture live hardware UAC2 or --simulated audio to GUANO WAV |
transcode <FILE> |
--mode te10 |
Export audible 48 kHz WAV (te10, te20, heterodyne, fdiv) |
synth-demo |
--preset B1 |
Synthesize calibrated bat/bird GUANO WAV (B1–B4, A1–A4, M1) |
Run $env:CARGO_BUILD_JOBS='4'; cargo test --all-targets (26 unit tests in src/lib.rs, 1 in src/main.rs, 10 integration tests in tests/bioacoustic_suite.rs):
| Test | Verified Metric / Outcome |
|---|---|
dsp::tests::stft_dc_and_nyquist_bins_not_inflated_by_6db |
Pure x = 0.5 DC signal yields mag == 0.5 (-6.02 ± 0.05 dBFS) |
dsp::tests::hilbert_envelope_seamless_across_32768_chunk_boundary |
40,000-sample 10 kHz unit sinusoid stays within [0.98, 1.02] across n = 32,768 |
dsp::tests::zero_phase_butterworth_prewarps_minus_3db_and_avoids_edge_transient |
Zero-phase LP hits -3.01 ± 0.20 dB at fc = 10 kHz with flat DC step response |
soundscape_indices::tests::adi_aei_half_open_bins_do_not_double_count_shared_boundary_bins |
Boundary bin 1.2 kHz belongs solely to band 1 (ADI == 0.0, AEI == 0.9) |
gui::tests::hotkeys_caliper_log_axis_and_256_lut_palettes |
Left/Right auto-center, Z zoom reset, 1-3 audition modes, Shift-caliper slope, Log-kHz, 256-LUT |
tests/bioacoustic_suite.rs |
Parseval FFT (1.0), MYLU/RHFE/COTO/A1/A4 detection, MFCC/UMAP, Raven TSV, SQLite WAL roundtrip |
APP-PREPRINT-17): SonoWing: Analyzing Bat Echolocation and Bird Calls with Spectrograms and Harmonic TrackingCITATION.cffCITATION.cff)cff-version: 1.2.0
message: "If you use this software or its validation datasets, please cite both the software repository and the accompanying CRV Science Apps monograph."
type: software
title: "SonoWing: Ultrasonic Bat Echolocation and Avian Bioacoustic Spectrogram, MFCC/UMAP, and Harmonic Analyzer"
version: "1.1.0"
date-released: "2026-11-15"
doi: "10.5281/zenodo.24244091"
url: "https://crvscience.com/apps"
repository-code: "https://github.com/bpwhite/crvscience-sonowing"
license: "GPL-3.0-or-later"
authors:
- family-names: "White"
given-names: "Bryan P."
affiliation: "CRV Science Labs"
orcid: "https://orcid.org/0000-0003-4191-3511"
keywords:
- "bioacoustics"
- "echolocation"
- "spectrograms"
- "soundscape ecology"
- "Rust"
preferred-citation:
type: article
title: "SonoWing: Analyzing Bat Echolocation and Bird Calls with Spectrograms and Harmonic Tracking"
authors:
- family-names: "White"
given-names: "Bryan P."
affiliation: "CRV Science Labs"
orcid: "https://orcid.org/0000-0003-4191-3511"
year: 2026
journal: "CRV Science Apps Preprints"
doi: "10.5281/zenodo.24244091"
url: "https://crvscience.com/apps/preprints/sonowing-bioacoustic-echolocation-analyzer"
notes: "Preprint ID: APP-PREPRINT-17"
references:
- type: article
title: "The CRV Science App Network: Twenty Open-Source Rust Programs for Science, Data, and Simulation"
authors:
- family-names: "White"
given-names: "Bryan P."
affiliation: "CRV Science Labs"
orcid: "https://orcid.org/0000-0003-4191-3511"
year: 2026
journal: "CRV Science Apps Preprints"
doi: "10.5281/zenodo.24222398"
url: "https://crvscience.com/apps/preprints/crv-science-public-apps-network"
notes: "Preprint ID: APP-PREPRINT-01 (CRV Science Open-Source Apps Network Overview)"
Version: 1.1.0
Repository: crvscience-sonowing
src/)src/call_extractor.rssrc/dsp.rssrc/exporters.rssrc/gui.rssrc/harmonic_tracker.rssrc/lib.rssrc/live_mic.rssrc/main.rssrc/mfcc_cluster.rssrc/soundscape_indices.rssrc/storage.rssrc/synth_presets.rssrc/taxa_library.rssrc/ultrasonic_audio.rssrc/wav_guano.rstests/)tests/bioacoustic_suite.rsPreprints/crv-science-public-apps-network.pdfPreprints/sonowing-bioacoustic-echolocation-analyzer.pdfdocs/SCIENTIFIC_METHODS.mddocs/USER_GUIDE.mdcargo test --release
Wiki: Home
Wiki: SonoWing_Scientific_Methods
Wiki: SonoWing_User_Guide