A python package for birdsongs creation and data extraction.
Project description
WaveSongs
A Python package for birdsong synthesis and bioacoustic analysis
🔎 Overview
WaveSongs implements the motor gestures model for birdsong developed by Gabo Mindlin to generate synthetic birdsongs through numerical optimization. By leveraging fundamental frequency (FF) and spectral content index (SCI) as key parameters, the package solves a minimization problem using SciPy and performs audio analysis with librosa.
Validated against field recordings of Zonotrichia Capensis, Ocellated Tapaculo, and Mimus Gilvus, the model achieves <5% relative error in FF reconstruction compared to empirical data.
⚒️ Installation
Prerequisites
Steps
-
Clone the repository:
git clone https://github.com/wavesongs/wavesongs cd wavesongs
-
Set up a virtual environment (choose one method):
Using
venvpython -m venv venv # Activate on Linux/macOS source venv/bin/activate # Activate on Windows .\venv\Scripts\activate
Using Conda
conda create -n wavesongs python=3.12 conda activate wavesongs
-
Install dependencies:
pip install -r requirements.txt
-
Install WaveSongs in editable mode:
pip install -e .
🚀 Gettint Started
Explore the Tutorial Notebook to generate synthetic birdsongs and analyze acoustic features. Here is an example of simple code to import and display an audio.
# select matplotlib backend for notebook, enable interactive plots
%matplotlib ipympl
from wavesongs.utils.paths import ProjDirs # project files manager
from wavesongs.objects.song import Song # song objects
from wavesongs.objects.syllable import Syllable # syllable objects
from wavesongs.utils import plots # plotter
proj_dirs = ProjDirs(audios="./assets/audio", results="./assets/results")
# define the song and compute its acoustical features
copeton_song = Song(proj_dirs, file_id="574179401")
copeton_song.acoustical_features(umbral_FF=1.4, NN=256)
# display the song
plots.spectrogram_waveform(copeton_song, save=False)
For advanced usage (e.g., custom gestures, parameter tuning), refer to the Documentation.
🎶 Data Integration
Pre-processed field recordings from Xeno Canto and eBird are included in ./assets/audio. To use custom recordings place .wav or .mp3 files in ./assets/audio/ or define the audios path with the ProjDirs class.
📜 License
WaveSongs is licensed under the GNU General Public License v3.0.
📒 Citation
If this work contributes to your research, please cite:
@software{aguilera_wavesongs_2025,
author = {Aguilera Novoa, Sebastián},
title = {WaveSongs: Computational Birdsong Synthesis},
year = {2025},
publisher = {GitHub},
journal = {GitHub Repository},
url = {https://github.com/wavesongs/wavesongs}
}
🌱 Contribute
We welcome contributions! See our roadmap:
- Integrate Xeno Canto API for direct dataset downloads
- Add ROIs analysis using
scikit-maad - Improve FF parametrization for non-linear gestures
To report issues or suggest features, open a GitHub Issue.
📚 References
Core Methodology
- Mindlin, G. B., & Laje, R. (2005). The Physics of Birdsong. Springer. DOI
- Amador, A., et al. (2013). Elemental gesture dynamics in song premotor neurons. Nature. DOI
Software
- Librosa • Audio analysis
- SciPy • Optimization routines
- scikit-maad • Soundscape metrics
Data Sources
- Xeno-Canto: Sharing wildlife sounds from around the world
- eBird: Macaulay Library. The Cornell Lab of Ornithology (2005)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wavesongs-0.0.1b0.tar.gz.
File metadata
- Download URL: wavesongs-0.0.1b0.tar.gz
- Upload date:
- Size: 42.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-52-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6173cc2e7363dcd0f6a7f9cf5cd2214482fe3cc99a3881d78ca17b3ba4622f34
|
|
| MD5 |
98975624d38822caabcd168adbcd5f64
|
|
| BLAKE2b-256 |
22df708ab87fd18aef043971582f6fc3ee5ea7d9d0c2e3924de1cd1358932def
|
File details
Details for the file wavesongs-0.0.1b0-py3-none-any.whl.
File metadata
- Download URL: wavesongs-0.0.1b0-py3-none-any.whl
- Upload date:
- Size: 44.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-52-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
350fe6b95758055ec0eb1db0ee13a3534e9dd0835fc1462c0bb58af491a3ad28
|
|
| MD5 |
1323d28e09883e413f1b79853b863ef0
|
|
| BLAKE2b-256 |
9331faa90e65000f161f8d6891be7af727a001e0e89242742c2c7a5a5c56e232
|