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.
- Create the environment and install Opensoundscape:
conda create --name opensoundscape python=3.7 opensoundscape=0.3.0.1
- Activate the environment:
conda activate opensoundscape
- Check if everything worked:
opensoundscape -h
- 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.
- Get the container:
singularity pull library://barrymoo/default/opensoundscape:0.3.0.1
- Check if Opensoundscape can run:
singularity run --app opensoundscape opensoundscape_0.3.0.1.sif -h
- 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
- The CLO-43SD-AUDIO dataset:
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 yourDownloads
folder, e.g. withvim
: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
andvirtualenvwrapper
, 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
- We use
- 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
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
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3314d3904471f32973980c7425efc341b2e5cf439418b2d11bfb59d713cb5d3 |
|
MD5 | 09f31bf321a60334107002706feb2cfe |
|
BLAKE2b-256 | 69be8b5a596ad347d4a4e8ae951ed148c8623d6ee4f53a084b9f10937770e7dc |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7269bfadc7d80212f775ae960c07ef6ca6e23f3c8854c5a015af423b58f9ccec |
|
MD5 | 65edf4fc639915496a3bc6e743379f5d |
|
BLAKE2b-256 | 5d1c1752e785a41e050222872fc0de7c588581cbb16d924b40a9922ac1de1708 |