Skip to main content

🐒 Sauim Bioacoustic Detector

sauim-detector is a Python command-line tool for bioacoustic processing and automatic detection of Pied tamarin (Saguinus bicolor) vocalizations. It uses a pre-trained bird vocalization embedding model and a custom One-Class SVM classifier trained to detect the target species.

Quick tutorial: Watch on YouTube

Installation

Create and activate a Python 3.12 environment. This step is recommended to keep dependencies isolated; the environment name can be anything:

conda create -n sauim python=3.12 pip
conda activate sauim
python -m pip install --upgrade pip

Install the released package from PyPI:

python -m pip install sauim-detector

For local development, clone the repository and install the package in editable mode:

git clone https://github.com/juancolonna/Sauim.git
cd Sauim
python -m pip install -e ./sauim-detector

The package requires Python >=3.12,<3.13. TensorFlow and TensorFlow Hub compatibility is sensitive to Python and setuptools versions, so the project pins setuptools<82.

Usage

Run the detector with a path to a .wav file:

sauim-detector records/Mindu_Saguinus_bicolor_02.02.19-000.wav

The --stride argument sets the hop length, in seconds, between consecutive analysis windows. It accepts values from 1.0 to 5.0; the default is 5.0. Lower values use more overlap between windows and may improve coverage of short vocalizations, but increase processing time. Example:

sauim-detector records/Mindu_Saguinus_bicolor_02.02.19-000.wav --stride 2.5

By default, detections are printed to the terminal in JSON format. To save detections as an Audacity label file use:

sauim-detector records/Mindu_Saguinus_bicolor_02.02.19-000.wav --save-detections

Save the band-pass filtered audio used by the detector:

sauim-detector records/Mindu_Saguinus_bicolor_02.02.19-000.wav --save-audio

Use all three options together:

sauim-detector records/Mindu_Saguinus_bicolor_02.02.19-000.wav --stride 2.5 --save-detections --save-audio

Outputs

With --save-detections, the CLI writes an Audacity-compatible label file named <input>_detections.txt next to the input audio:

start_time    end_time    label
0.00          7.20        Pied tamarin
10.00         15.50       Pied tamarin
20.00         30.80       Pied tamarin

These labels can be imported into Audacity with File > Import > Labels....

Without --save-detections, the CLI prints JSON detections to stdout. Each detection includes:

  • species: common name
  • scientific: scientific name
  • confidence: One-Class SVM decision score, not a calibrated probability
  • start_time: detection start time in seconds
  • end_time: detection end time in seconds

Example:

[
  {
    "species": "Pied tamarin",
    "scientific": "Saguinus bicolor",
    "confidence": 0.003421,
    "start_time": 12.0,
    "end_time": 17.0
  }
]

Notes

  • Input files must be .wav files.
  • Audio is loaded at 32 kHz.
  • The classifier only detects the target species, Pied tamarin (Saguinus bicolor).
  • The confidence field is the raw OCSVM decision score. Positive scores are detections; negative scores are rejected before output.
  • Labels should be manually validated in Audacity.

Metadata

Release files for sauim-detector 0.1.6

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

Source distribution (sdist)

Source distribution for sauim-detector 0.1.6
File Size Uploaded
sauim_detector-0.1.6.tar.gz 75.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sauim-detector 0.1.6
File Interpreter ABI Platform
sauim_detector-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 150.3 kB

Release files / sauim_detector-0.1.6.tar.gz

Download URL sauim_detector-0.1.6.tar.gz
Size 75.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cb51111d2c9d468343505233a7bd85113a70cf996dea03017b86ed68121f89af
BLAKE2b-256 checksum
How to use checksums
6b2076536fa500a173e6898e8528a3b4de95d25ff6807f06368bb1e33a2b7298
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / sauim_detector-0.1.6-py3-none-any.whl

Download URL sauim_detector-0.1.6-py3-none-any.whl
Size 74.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
475325ceb49eb9f2728d2ac624ec80de6b8c1e0aa812952e700cd498cba51e7e
BLAKE2b-256 checksum
How to use checksums
45364781ef7dc6d442ec5a8ac27f1f85e27cf64c1fe67bda55816f5719d7e460
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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