Spectrogram representation
STFT turns each audio window into a two-dimensional magnitude map for the CNN.
Case study / 08
Detecting wildlife calls from raw rainforest audio.
Echo is an end-to-end audio classification pipeline for Capuchinbird field recordings. It standardizes raw audio, transforms fixed three-second windows into magnitude spectrograms, trains a compact CNN to recognize call evidence, then scans long recordings and collapses consecutive positive windows into per-file call counts.
STFT turns each audio window into a two-dimensional magnitude map for the CNN.
Every example becomes 16 kHz mono audio with exactly 48,000 samples.
Both metrics expose performance on imbalanced call and no-call windows.
Adjacent positive windows collapse before the per-recording count is written.
| Decision | Why | Tradeoff |
|---|---|---|
| Classify spectrograms instead of raw waveforms | A magnitude STFT gives a compact time-frequency image that a small 2D CNN can learn from. | Frame length and step become fixed preprocessing choices. |
| Use one three-second input contract | Training clips and inference windows reach the model with the same 48,000-sample shape. | Longer context is discarded and shorter clips require zero-padding. |
| Collapse consecutive positives | A sustained call can trigger adjacent windows, so runs of positives count once. | Non-overlapping windows can still split a call near a boundary. |
Deep dive A
Echo converts a three-second waveform into a magnitude spectrogram. Time runs horizontally, frequency vertically, and brighter regions carry more energy for the convolutional filters.
Deep dive B
A call may remain audible across adjacent windows. Grouping consecutive predictions converts each positive run into one event before summing, so six raw positives above become three calls.
Verified repository output
The checked-in results CSV provides the per-recording counts. This is pipeline output from the supplied forest recordings, not a production quality benchmark.