source: python/README @ e794a80

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since e794a80 was e794a80, checked in by Paul Brossier <piem@piem.org>, 11 years ago

python/README: improve

  • Property mode set to 100644
File size: 2.1 KB
Line 
1Python aubio module
2===================
3
4This module wraps the aubio library for Python using the numpy module.
5
6Before compiling this module, you must have compiled libaubio.
7
8For more information about how this module works, please refer to the [Python/C
9API Reference Manual] (http://docs.python.org/c-api/index.html) and the
10[Numpy/C API Reference](http://docs.scipy.org/doc/numpy/reference/c-api.html).
11
12Compiling python aubio
13----------------------
14
15After libaubio has been build successfully, and provided Python development
16headers and numpy can be found on your system, you should be able to build the
17aubio Python module:
18
19    $ ./setup.py build
20
21To find out more about `setup.py` options:
22
23    $ ./setup.py --help
24
25Installing
26----------
27
28To install the Python module:
29
30    $ ./setup.py install
31
32Using the Python module
33-----------------------
34
35Once the aubio library and the Python module are installed, you will be able to
36import the aubio module:
37
38    $ python
39    [...]
40    >>> import aubio
41    >>>
42
43Alternatively, you may want to use the Python module without installing it by
44setting PYTHONPATH:
45
46    $ export PYTHONPATH=$PYTHONPATH:$PWD/`ls -rtd build/lib.* | head -1`:$PWD/tests
47
48Similarly, you can use the aubio module without installing libaubio by pointing
49LD_LIBRARY_PATH to the path libaubio can be found at:
50
51    $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:PWD/../build/src
52
53Or on Mac OS X systems, setting DYLD_LIBRARY_PATH:
54
55    $ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$PWD/../build/src
56
57Testing the Python module
58-------------------------
59
60Once both the C library and the Python module have been built correctly, and
61after you have installed them (or setting the environment variable correctly),
62you should be able to run the tests:
63
64    $ ./tests/run_all_tests
65
66And to try out the demos:
67
68    $ ./demos/demo_source.wav ~/test.wav
69
70You need to install additional modules to run some of the demos. For
71instance, several demos use [matplotlib](http://matplotlib.org/) to draw plots.
72Some more demos use [PySoundCard](https://github.com/bastibe/PySoundCard) to
73play and record sounds.
Note: See TracBrowser for help on using the repository browser.