Skip to main content

Open source, scalable acoustic classification for ecology and conservation

Project description

Opensoundscape

Installation

We recommend you run Opensoundscape into a Python 3.7 virtual environment. If you don't already have Python installed you can use the Anaconda distribution. Simply select your platform (Windows, macOS, or Linux) and download a Python 3.7 64-bit installer. You will also need to run a MongoDB server which is used to store data for Opensoundscape. The documentation for this process is available here. The documentation also explains how to start the service on various platforms.

Now, you can get Opensoundscape via PyPI. I will show the conda commands below, but we use virtualenvwrapper internally.

  1. Create the environment and install Opensoundscape: conda create --name opensoundscape python=3.7 opensoundscape=0.3.0.1
  2. Activate the environment: conda activate opensoundscape
  3. Check if everything worked: opensoundscape -h
  4. Deactivate the environment when finished: conda deactivate

Singularity Container

Currently, Singularity is only working on Linux. The developers recently showed a development version which works on macOS. You can pull our container from here.

  1. Get the container: singularity pull library://barrymoo/default/opensoundscape:0.3.0.1
  2. Check if Opensoundscape can run: singularity run --app opensoundscape opensoundscape_0.3.0.1.sif -h
  3. Check if MongoDB can run: singularity run --app mongodb opensoundscape_0.3.0.1.sif -h

Quick Start Guide

Going to run through a quick example of running Opensoundscape. First, we need some data

cd ~/Downloads
wget https://datadryad.org/bitstream/handle/10255/dryad.111783/CLO-43SD-AUDIO.tar.gz
tar -xzf CLO-43SD-AUDIO.tar.gz
rm CLO-43SD-AUDIO.tar.gz
  • Download our training & prediction split of a subset of the CLO-43SD dataset:
cd ~/Downloads/CLO-43SD-AUDIO/
wget https://raw.github.com/rhine3/opso-support/master/clo-43sd-train-small.csv
wget https://raw.github.com/rhine3/opso-support/master/clo-43sd-predict-small.csv
  • Make a new directory to run Opensoundscape in, using ~/clo-43sd below
cd ~/clo-43sd
wget https://raw.github.com/rhine3/opso-support/master/opso-test-small.ini
  • Edit the .ini to reflect the absolute path of your Downloads folder, e.g. with vim: vim opso-test-small.ini
  • Start the MongoDB daemon in another terminal: mongod --config /usr/local/etc/mongod.conf
  • Run Opensoundscape:
opensoundscape init -i opso-test-small.ini
opensoundscape spect_gen -i opso-test-small.ini > spect-gen-output-small.txt
opensoundscape model_fit -i opso-test-small.ini > model-fit-output-small.txt
opensoundscape predict -i opso-test-small.ini > predict-output-small.txt

Contributions

Contributions are highly encouraged! Our development workflow is a combination of virtualenvwrapper and poetry.

  • Get poetry
  • Get virtualenvwrapper
  • Link poetry and virtualenvwrapper, add something like the following to your ~/.bashrc (don't forget to source it!)
# virtualenvwrapper + poetry
export WORKON_HOME=~/.cache/pypoetry/virtualenvs
source /usr/bin/virtualenvwrapper_lazy.sh
  • Fork the github repository, and clone it
    • We use black pre-commit hooks for formatting
  • Build the virtual environment for opensoundscape: poetry install
  • Activate your opensoundscape environment: workon opensoundscape-py3.7
  • Check Opensoundscape runs: opensoundscape -h
  • To go back to your system's Python: deactivate
  • Running the tests: poetry run pytest tests

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

opensoundscape-0.3.0.1.tar.gz (28.1 kB view details)

Uploaded Source

Built Distribution

opensoundscape-0.3.0.1-py3-none-any.whl (106.9 kB view details)

Uploaded Python 3

File details

Details for the file opensoundscape-0.3.0.1.tar.gz.

File metadata

  • Download URL: opensoundscape-0.3.0.1.tar.gz
  • Upload date:
  • Size: 28.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.11 CPython/3.7.2 Linux/4.20.13-arch1-1-ARCH

File hashes

Hashes for opensoundscape-0.3.0.1.tar.gz
Algorithm Hash digest
SHA256 c3314d3904471f32973980c7425efc341b2e5cf439418b2d11bfb59d713cb5d3
MD5 09f31bf321a60334107002706feb2cfe
BLAKE2b-256 69be8b5a596ad347d4a4e8ae951ed148c8623d6ee4f53a084b9f10937770e7dc

See more details on using hashes here.

File details

Details for the file opensoundscape-0.3.0.1-py3-none-any.whl.

File metadata

  • Download URL: opensoundscape-0.3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 106.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.11 CPython/3.7.2 Linux/4.20.13-arch1-1-ARCH

File hashes

Hashes for opensoundscape-0.3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7269bfadc7d80212f775ae960c07ef6ca6e23f3c8854c5a015af423b58f9ccec
MD5 65edf4fc639915496a3bc6e743379f5d
BLAKE2b-256 5d1c1752e785a41e050222872fc0de7c588581cbb16d924b40a9922ac1de1708

See more details on using hashes here.

Supported by

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