Gaia is a C++ library with python bindings which implements similarity measures and classifications on the results of audio analysis, and generates classification models that Essentia can use to compute high-level description of music.
Licence: Affero GPLv3 license
Documentation: http://essentia.upf.edu/documentation/gaia
Dependencies:
- Qt >= 5.12
- libYAML >= 0.1.1
- Python >= 3.7
- SWIG >= 3.0.12
- Eigen >= 3.3.4
-
Install dependencies (Ubuntu/Debian)
apt-get install build-essential qtbase5-dev libyaml-dev swig python3-dev pkg-config libeigen3-dev -
Online help for WAF (build system)
python3 waf --help -
Configure with the desired options:
python3 waf configure --download [--with-python-bindings] [--with-stlfacade] [--with-asserts]NOTE: in order to link Essentia library with Gaia, do not use the --with-stlfacade option
-
Compile libgaia.a:
python3 waf -
Install (to install system-wide you might need
sudo)python3 waf install [--destdir=/where/ever/] -
Build documentation (optional), it will be located at build/doc/ folder
python3 src/doc/regenerate_docstring.py
-
Install homebrew tap:
brew tap MTG/essentia -
Build Gaia (this will also install all the dependencies)
brew install gaia --HEAD
-
Install python, qt libraries 5, libYAML and swig dependencies using Homebrew:
brew install python brew install swig libyaml qt@5 -
Install pyyaml pip package in case you want to build with python bindings:
pip install pyyaml -
Configure and build similarly to Linux (see above).
-
Install qt libraries (including debug libraries) and QtCreator from the Qt download archives.
-
Install libYAML and swig dependencies using Homebrew (we assume you already have a python installation, otherwise you can also install it using Homebrew):
brew install swig libyaml -
Use QtCreator to open the project file 'Gaia2lib.pro' in packaging/darwin/Gaia2lib/
-
Compile the project (you will probably need to configure QtCreator to work with your Qt installation and also to set up the build folder for the project)
-
Use swig to generate the file 'gaia_wrap.cxx' that will be needed to compile 'Gaia2Python':
swig -c++ -python -w451 /path_to_gaia_source/src/bindings/gaia.swig -
Copy the generated 'gaia_wrap.cxx' to the Gaia2Python project folder:
cp /path_to_gaia_source/src/bindings/gaia_wrap.cxx /path_to_gaia_source/packaging/darwin/Gaia2Python/ -
Use QtCreator to open the project file 'Gaia2Python.pro' in packaging/darwin/Gaia2Python/ and compile
-
Run ./make_release_tarball in packaging/darwin:
./make_release_tarball -
Copy the folder packaging/darwin/tmp/gaia2/python/gaia2 (created when running make_release_tarball.sh) to the site-packages directory of your python distribution. You can now import gaia2 from python.
- Use the QtCreator projects inside the packaging/win32 directory.
This library contains source code from the LibSVM project, which is distributed under the revised BSD license. Please refer to the src/3rdparty/libsvm/COPYRIGHT file for more information.
This library contains the Mersenne Twister random number generator, which is distributed under the BSD license.
This library contains source code from the Alglib project, which is distributed under the 3-clause BSD license.
This library contains source code from FrogLogic command line parser which is distributed under the BSD license.