Skip to main content

Bioacoustic processing and Pied tamarin (Saguinus bicolor) vocalization detector.

Project description

🐒 Sauim 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 from the repository root:

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

By default, detections are printed to the terminal in JSON format.

Save detections as an Audacity label file:

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

Save the processed audio used by the detector:

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

Use both options together:

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

Outputs

With --save-detections, the CLI writes an Audacity-compatible label file 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sauim_detector-0.1.4.tar.gz (74.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sauim_detector-0.1.4-py3-none-any.whl (74.4 kB view details)

Uploaded Python 3

File details

Details for the file sauim_detector-0.1.4.tar.gz.

File metadata

  • Download URL: sauim_detector-0.1.4.tar.gz
  • Upload date:
  • Size: 74.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for sauim_detector-0.1.4.tar.gz
Algorithm Hash digest
SHA256 1a7cf6e959fb9bcf8f2102cc795639a9f77340bf7101c4d1bc1471d25d0d5580
MD5 2773de380a0ac3e791edb0d58e1ed381
BLAKE2b-256 d51bcf7726427c4663b69537d934e07c456ad2153802bd288e50afd4e41833b8

See more details on using hashes here.

File details

Details for the file sauim_detector-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: sauim_detector-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 74.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for sauim_detector-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3ccff256981cdf866b9983fa7dc96319ce64c36bd8b9868fd920c5537b77b830
MD5 63f2049b8675db97f1c6177e00f63d83
BLAKE2b-256 18bd6eb82e4ab3c35523ef5e551456ddebe4be257ec42a3f520f880d1a7e5d5c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page