Skip to main content

MagPy

A free, open-source desktop app for looking at, listening to, annotating, and measuring animal sound recordings. MagPy is the graphical front end to bioamla, the bioacoustics and machine-learning library that does the analysis underneath.

The MagPy annotation screen: a spectrogram with labelled boxes drawn around calls, a waveform above it, and a selection table of measurements below

Status: alpha. MagPy is under active development and not yet on PyPI. Install it from source (below). Expect rough edges and changes.

What you can do with it

Annotate recordings

  • Open any WAV, FLAC, OGG, MP3, or M4A file and see its waveform and spectrogram on a shared time axis. Recordings of any length open quickly: the spectrogram is rendered for the part you are looking at, and sharpens as you zoom in.
  • Drag on the spectrogram to draw a time-frequency box around a sound. Drag on the waveform for a time-only selection. Move or resize a box by its handles, or type exact bounds into the table.
  • Label boxes as you go: set the label for new boxes once, relabel with the number keys, or type into the table. Each label gets its own colour.
  • Every edit can be undone, and annotations are saved into your workspace automatically.
  • Tune the picture: brightness, contrast, colormap, FFT size, overlap, and window function. Your choices are remembered.

Listen

  • Play from anywhere, play just the selected box, or loop it.
  • Slow playback down to as little as one tenth speed. Pitch drops with speed, which brings fast or high-pitched calls into hearing range.

Measure

  • The selection table shows measurements for every annotation, computed from the audio inside its box: duration, peak and center frequency, bandwidths, frequency percentiles, RMS and peak level, power, entropy, and peak-frequency contour statistics. Choose the columns you want.
  • Export the table as CSV with its measurements, or as a Raven-format selection table (.txt) for use with other tools. Both formats can be imported back.

Find and identify sounds

  • Run a detector (band-limited energy, pulse-rate, wavelet peaks, or accelerating patterns) and review what it finds as dashed candidate boxes on the spectrogram. Keep the ones you want as annotations.
  • Identify: label annotations with an audio classifier. Point MagPy at a model on Hugging Face or on disk and it classifies the sound inside each box, writing the best guess and its confidence into the table.

Work with collections

  • Compute acoustic indices (ACI, ADI, AEI, BIO, NDSI, entropy) for a recording.
  • Search and download recordings from Xeno-canto, the Macaulay Library, iNaturalist, and eBird; pull datasets from Hugging Face.
  • Build training datasets from your annotations, train and evaluate classifiers, explore embeddings as clusters, and run any single-file operation across a whole folder.

Install

MagPy needs Python 3.11 or newer and uv.

git clone https://github.com/jmcmeen/magpy.git
cd magpy
make sync                 # create the environment and install everything
make run                  # launch MagPy
make run FILE=owl.wav     # launch with a recording open

For formats other than WAV, FLAC, and OGG, and for the machine-learning features, bioamla also needs FFmpeg installed on your system. See bioamla's system dependencies for the supported versions.

Using the annotation screen

To do this Do this
Draw a box Drag on the spectrogram
Draw a time-only selection Drag on the waveform
Select a box Click it
Move or resize the selected box Drag it, or drag a handle
Move the playhead Click empty space
Play a box Double-click it
Zoom in time Scroll
Zoom in frequency Ctrl/Cmd + scroll
Pan Right-drag, or scroll sideways
Key Action
Space Play / pause
Shift+Space Play the selected box (or the visible span)
1 – 9 Apply one of the first nine labels to the selected box
L Jump to the label field (Enter applies it to the selected box)
Enter Edit the selected box's label in the table
N / P Next / previous annotation
Z Zoom to the selected box
Delete Delete the selected box
Ctrl/Cmd+Z, Shift+Ctrl/Cmd+Z Undo, redo
I Identify with a model
S, B, then Enter Place a time or box selection from the keyboard, then keep it

Workspaces

MagPy always has a workspace open. A workspace is a folder ending in .magpy that remembers which recordings you are working with and holds their annotations. Recordings are linked, not copied, so a workspace stays small and your original files are never modified. Use Add ▾ → Import a copy when you want a recording stored inside the workspace itself.

Development

make check    # lint, format check, and tests
make test     # tests only
make fmt      # auto-format

MagPy keeps every bioamla call behind a thin services layer, so the interface code never depends on bioamla directly. ARCHITECTURE.md explains the layering and the reasoning behind it.

License

MIT. See LICENSE.

Metadata

Release files for magpy-gui 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for magpy-gui 0.2.0
File Size Uploaded Provenance Actions
magpy_gui-0.2.0.tar.gz 881.4 kB With provenance Details for magpy_gui-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for magpy-gui 0.2.0
File Interpreter ABI Platform Actions
magpy_gui-0.2.0-py3-none-any.whl Python 3 none any Details for magpy_gui-0.2.0-py3-none-any.whl

Total release size: 1.0 MB

Release files / magpy_gui-0.2.0.tar.gz

Download URL magpy_gui-0.2.0.tar.gz
Size 881.4 kB
Tags Source
SHA-256 checksum
How to use checksums
519358632fd23000617fd92514eb08124fe145ab0f72b6b02db05d3070571d27
BLAKE2b-256 checksum
How to use checksums
645fe307e479e5abb8c551364099136dffdd3760ed90a0ad3667a99dbbed3e78
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 28, 2026.

Transparency log

Release files / magpy_gui-0.2.0-py3-none-any.whl

Download URL magpy_gui-0.2.0-py3-none-any.whl
Size 145.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1f50de19a7f364275d69bb428b2e0f11e638ea25b64740d6ab49aacac1e3e80
BLAKE2b-256 checksum
How to use checksums
3fda6ab1d54502f2936056f459904f5716b15c1c900f282e05a1f6dc8ee18de5
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 28, 2026.

Transparency log

Security for magpy-gui 0.2.0

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.

Select from 2 files

Attestation for magpy_gui-0.2.0.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 28, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page