Skip to content
/ maple Public

A virtual dog-sitter that tracks, classifies, and responds to dog audio.

License

Notifications You must be signed in to change notification settings

ekiefl/maple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the homepage for my project maple, an open source software I have developed for self-monitoring your dog. The tool features audio event detection and classification, interactive plots for analyzing dog behavior, and intervening logic so that you can praise your dog for being quiet, console it for whining, scold it for barking, with pre-recorded audio of yourself.

Development blog

The development of this entire project has been meticulously blogged and can be found here

Installation

Dependencies

The installation instructions assume you have conda. conda isn't a requirement for installing, but if you don't want to use it, you're on your own.

A primary module is pyaudio, which has portaudio as a dependency. If you're MacOS and aren't averse to brew, you can easily install portaudio with

brew install portaudio

If you're on a different OS or don't like brew, check out the portaudio installation recommendations from this lovely discussion.

Procedure

Deactivate from any conda environments you are currently in, and then create a new conda environment called maple:

conda deactivate
conda create -n maple python=3.8.8
conda activate maple

Verify you're running 3.8.8

$ python
Python 3.8.8 (default, Apr 13 2021, 12:59:45)
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

Install all of the dependencies:

conda install -y -c conda-forge python-sounddevice
conda install -y -c anaconda pyaudio
conda install -y numpy
conda install -y pandas
conda install -y scipy
conda install -y scikit-learn
conda install -y matplotlib
conda install -y plotly
conda install -y -c conda-forge tabulate
conda install -y -c anaconda joblib
pip install noisereduce

Now, its time to fetch a copy of the codebase:

git clone https://github.com/ekiefl/maple.git
cd maple

Finally, create a script that runs whenever the conda environment is activated. This script modifies $PATH and $PYTHONPATH so that python knows where to find maple libraries and the shell knows where to find the maple binary. These path modifications live safely inside the maple conda environment, and do not propagate into your global environment:

mkdir -p ${CONDA_PREFIX}/etc/conda/activate.d
cat <<EOF >${CONDA_PREFIX}/etc/conda/activate.d/maple.sh
export PYTHONPATH=\$PYTHONPATH:$(pwd)
export PATH=\$PATH:$(pwd)/bin
EOF

Upon activating your conda environment once more (conda activate maple), maple is now a binary that can be run anywhere in your filesystem whenever you are in the maple conda environment. Time to test your installation by recording your first session:

maple run

About

A virtual dog-sitter that tracks, classifies, and responds to dog audio.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages