computational toolkit · v0.1.0

decipher

A computational toolkit for analyzing recordings of non-human acoustic communication — primarily cetacean vocalizations. It loads audio with provenance, segments it into listenable units, clusters those units, and provides information-theoretic and sequence-statistical primitives for the resulting symbol streams.

Round-trip invariant. Every primitive that touches audio keeps the audio playable. Detected units carry their own samples; clusters yield audio exemplars; embeddings ship with a lookup back to the source clip. If you cannot listen to it at every stage, the primitive is wrong.

What it sounds like

Three species, three acoustic regimes — all pulled live from the remote data catalog bundled with the toolkit. Head to the audio gallery for more.

Humpback whale song
Humpback whale song
Megaptera novaeangliae. Tonal, hierarchical. Energy in 200–2000 Hz. 44100 Hz 30 s
Killer whale source call
Killer whale source call
Orcinus orca. Short stereotyped pulsed call, recorded at 250 kHz. 250000 Hz 1.7 s
Sperm whale coda
Sperm whale coda
Physeter macrocephalus. Rhythmic broadband click train — the information is in the timing. 44100 Hz 2.2 s

A round-trip through the pipeline

Stage 0 — raw recording
Stage 0 — raw recording
30 s excerpt of humpback song from the Payne & McVay 1971 corpus. 30 s
Stage 1 — bandpassed (40–4000 Hz)
Stage 1 — bandpassed (40–4000 Hz)
Same audio after a Butterworth bandpass; the sub-40 Hz rumble is gone.
Stage 2 — segmented unit
Stage 2 — segmented unit
Energy-based detection yields timestamped clips. Each one is a Unit object you can listen to. 0.375 s
Stage 3 — cluster exemplar
Stage 3 — cluster exemplar
A representative unit from cluster 0 after standardise → PCA → HDBSCAN. Scatter shows units projected into PCA space coloured by cluster.

Where to start

Modules at a glance

ModulePurpose
decipher.audioLoading, writing, bandpass, resample, energy-based unit detection.
decipher.clusterStandardise → PCA → HDBSCAN with noise reassignment.
decipher.streamSymbolStream: categorical sequence aligned to its audio units.
decipher.featuriseMel-patch features and SSL input preparation.
decipher.sslFrozen AVES embeddings and pooling.
decipher.autoencoderConvolutional autoencoder embedder + reconstruction.
decipher.infotheoryShannon entropy, joint/conditional entropy, mutual information.
decipher.sequenceMenzerath, Zipf, n-gram perplexity, transition counts.
decipher.statsKDE, permutation tests, RSA, linear CKA.
decipher.diversityHill numbers, coverage, bootstrap CI.