Ecosound is an open source Python package to facilitate the analysis of passive acoustic data. It includes modules for manual annotation processing and visualization, automatic detection, signal classification, and localization. It heavily relies on libraries such as xarray, pandas, numpy, and scikit-learn. Under the hood it also uses dask, which supports the processing of large data sets that don't fit into memory and makes processing scalable through distributed computing (on either local clusters or on the cloud). Outputs from ecosound are compatible with popular bioacoustics software such as Raven and PAMlab.
- Annotation — load, filter, merge, and export manual annotations from Raven and PAMlab
- Audio tools — read audio files, apply filters, compute spectrograms
- Detection — plug-in detectors (blob, kurtosis) with a common factory interface
- Evaluation — compute Precision, Recall, and F-score curves for detectors
- Visualization — plot waveforms, spectrograms, annotation heatmaps, and interactive AIS maps
pip install ecosoundfrom ecosound.core.annotation import Annotation
# Load annotations from a Raven selection table
annot = Annotation()
annot.from_raven('my_annotations.txt', class_header='Sound type')
# Keep only high-confidence detections with the label "MW"
annot.data = annot.filter('label_class == "MW" & confidence >= 0.8')
# Aggregate and visualise
annot.plot_heatmap()Ecosound is very much a work in progress and is still under heavy development. At this stage, it is recommended to contact the main contributor before using ecosound for your projects.
API documentation is available at https://ecosound.readthedocs.io.
Xavier Mouy (@XavierMouy), Acoustics and Conservation Technology (ACT) Lab, Woods Hole Oceanographic Institution (WHOI).
Over the years, this project has received support from:
- Woods Hole Oceanographic Institution (WHOI)
- NOAA Fisheries
- Canadian Healthy Oceans Network (CHONe)
- University of Victoria
- Fisheries and Oceans Canada
Ecosound is licensed under the open source BSD-3-Clause License.
