bioamla
A Python library and command-line tool for bioacoustics: audio and recorder metadata, signal processing, acoustic indices, event detection, spectrograms, species catalogs, datasets, and Audio Spectrogram Transformer (AST) models. Run it on your laptop, or on a server next to your recordings.
Install
Python 3.11 or newer, in a virtual environment:
pip install "bioamla[all,cli]" # everything, plus the `bioamla` command
pip install "bioamla[audio,cli]" # or only the parts you need
pip install bioamla # the slim library alone: no PyTorch, librosa or plots
| Extra | For |
|---|---|
| (none) | audio I/O and info, recorder metadata, batch runs, datasets, catalogs |
audio |
signal processing (filter, denoise, segment, ...) and playback |
viz |
spectrograms, plots and videos |
indices |
acoustic indices |
detect |
event detection |
ml |
AST prediction, training and embeddings (PyTorch) |
cluster |
dimensionality reduction and clustering |
server |
bioamla serve |
cli |
the bioamla command |
all |
every extra but cli |
Using a feature whose extra is missing tells you what to install.
System dependencies
Formats other than WAV, FLAC and OGG, and spectrogram videos, need FFmpeg
(apt install ffmpeg, brew install ffmpeg, or conda install -c conda-forge ffmpeg).
AST prediction can use its shared libraries (versions 4 to 8) to decode audio. Check what
you have with bioamla system deps.
Quickstart
bioamla audio info recording.wav # duration, rate, channels, bit depth
bioamla audio metadata recording.wav # recorder metadata: when, where, which unit
bioamla audio visualize recording.wav -o spec.png
bioamla indices compute recording.wav # ACI, ADI, AEI, BIO, NDSI, entropy
bioamla detect energy recording.wav -o detections.csv
bioamla models ast predict frog.wav --model-path bioamla/scp-frogs --top-k 3
# The same over a folder, or a CSV with a file_name column (a copy with the results
# added goes to the output folder):
bioamla batch index --input-dir ./recordings --output-dir ./out
bioamla batch detect energy --input-file recordings.csv --output-dir ./out
bioamla --json <command> prints one JSON document, for scripts and agents. Every
command has --help, and the CLI reference
lists them all.
Everything the command does, the library does too:
from bioamla.audio import load_audio_data
from bioamla.indices import compute_all_indices
from bioamla.ml import classify_file
audio = load_audio_data("recording.wav")
print(compute_all_indices(audio.samples, audio.sample_rate).aci)
print(classify_file("frog.wav", model_path="bioamla/scp-frogs").predictions[0].predicted_label)
Errors raise bioamla.exceptions.BioamlaError (or a subclass).
Workspaces
A workspace is a project folder that remembers its recordings, settings and history:
bioamla workspace init costa-rica && cd costa-rica
bioamla workspace add /data/recordings/site1 # link recordings where they are
bioamla workspace config set detect.energy.threshold_db -25
bioamla workspace history # what ran, when, and what it wrote
Working on a server
Run bioamla on the machine that holds the recordings (or the GPU), and drive it from your laptop with the same commands:
# On the server (it listens on localhost only)
pip install "bioamla[all,cli]"
bioamla serve --root ~/bioamla-workspaces --allow-link /data/recordings
# On the laptop: reach it through an SSH tunnel, then add it as a remote
ssh -N -L 8765:localhost:8765 lab-server &
bioamla remote add lab http://localhost:8765
export BIOAMLA_LAB_TOKEN=... # from the server's token file
bioamla remote workspaces lab --create costa-rica
bioamla remote upload lab costa-rica rec.wav --to raw
bioamla --remote lab:costa-rica detect energy raw/rec.wav
The output is the same as a local run's. See Running the server for the token, a VPN instead of a tunnel, and systemd.
Agent skills
skills/ has skills that let an
AI agent drive bioamla, locally or on a server: inventory describes a folder of
recordings, and label does a first pass of labeling, sending anything uncertain to a
person. See Agent skills.
API keys
The catalog commands read EBIRD_API_KEY, XC_API_KEY (Xeno-canto) and HF_TOKEN
(Hugging Face) from the environment, or from a .env file in the working directory or a
parent (only those three keys, and an exported variable wins). Nothing else needs a key.
More
- Documentation: the CLI reference, using the library and its API reference, settings and recorder metadata.
- Examples: end-to-end scripts, from catalog downloads to a trained and published model.
- Contributing, Code of Conduct, Security Policy.
Citation
If you use bioamla in research, please cite the Zenodo DOI of the version you used, or
use GitHub's "Cite this repository" button
(CITATION.cff):
@software{mcmeen_bioamla,
author = {McMeen, John},
title = {bioamla: Bioacoustics \& Machine Learning Applications},
year = {2026},
license = {MIT},
url = {https://github.com/jmcmeen/bioamla}
}
License
MIT. See LICENSE.
Metadata
Release files for bioamla 0.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bioamla-0.4.4.tar.gz | 443.5 kB | With provenance | Details for bioamla-0.4.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bioamla-0.4.4-py3-none-any.whl | Python 3 | none | any | Details for bioamla-0.4.4-py3-none-any.whl |
Total release size: 980.7 kB
Release files / bioamla-0.4.4.tar.gz
| Download URL | bioamla-0.4.4.tar.gz |
|---|---|
| Size | 443.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2879b089f0feb50fdef4de956d52bdf1b0f462a2a9826b890118b172e618713c
|
|
BLAKE2b-256 checksum How to use checksums |
070e6fa194c0b77f71343c15a22028511b83408231336a3dcc8a7b57c11b8434
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / bioamla-0.4.4-py3-none-any.whl
| Download URL | bioamla-0.4.4-py3-none-any.whl |
|---|---|
| Size | 537.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9857669bf366d8bb9ec7156fc9fc3a27129392d1359a0f5f073b5bbf7117d3d3
|
|
BLAKE2b-256 checksum How to use checksums |
5a362dbae5632578e5b07e9b18f4675ed08681a4726cce7833370377dbcf16af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logSecurity for bioamla 0.4.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for bioamla-0.4.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.