AudioCommons / timbral_models

Python scripts for modelling timbral attributes
Apache License 2.0
75 stars 26 forks source link

Add info about requirements #1

Open ffont opened 7 years ago

ffont commented 7 years ago

Some of the scripts require external software to be installed and won't work out of the box (e.g. numpy, soundfile, librosa). These should al least be listed in the README. In future iterations it would be great to provide a docker image (we can do it as part of the main audio commons extractor) to facilitate running these algorithms.

ffont commented 7 years ago

Also dependencies could be simplified. Considering that ideally all audio analysis tools of Audio Commons could be unified in a single tool, it would be good that they had similar dependencies.

In https://github.com/AudioCommons/ac-audio-extractor he have included a single audio extractor for musical properties of music samples which in the future could be extended to incorporate all annotation tools. In this repo we provide a Docker image to simplify the problems with dependencies. This docker image already has Essentia bundled in it (and the python bindings). A way to simplify the current timbral models would be to use essentia for loading audio (instead of soundfile) and for onset detection (instead of librosa). In this way it would be easier to bundle all tools in a single container.

Nevertheless it should be first tested if the obtained results are the same (or very similar) after these change of dependencies.

Audio files can be loaded in essentia using one of its loaders, for example:

from essentia.standard import *
audio = MonoLoader(filename = filename)()

Onsets can be computed using the OnsetDetection and Onsets algorithm as shown in this example: https://github.com/MTG/essentia/blob/master/src/examples/tutorial/example_onsetdetection.py.

AndyP103 commented 7 years ago

I've added text in the README about dependencies and how they can be installed.

In a future update, the code will be restructured so that it can be downloaded with pip install. This will take care of all dependencies and help with dissemination.

I will also look into replacing the librosa library with essentia after the deliverable is finished; however, I'm concerned that since there isn't a pip install version, this may make the dissemination harder.