3 Installing aubio for Python
4 ===========================
6 The aubio extension for Python is available for Python 2.7 and Python 3.
8 Installing aubio with pip
9 -------------------------
11 aubio can now be installed using ``pip``:
13 .. code-block:: console
20 From ``aubio`` source directory, run the following:
22 .. code-block:: console
26 $ sudo ./setup.py install
31 Once the python module is installed, its version can be checked with:
33 .. code-block:: console
35 $ python -c "import aubio; print(aubio.version, aubio.float_type)"
37 The command line `aubio` is also installed:
39 .. code-block:: console
46 Here is a :download:`simple script <../python/demos/demo_source_simple.py>`
47 that reads all the samples from a media file:
49 .. literalinclude:: ../python/demos/demo_source_simple.py
52 Filtering an input sound file
53 .............................
55 Here is a more complete example, :download:`demo_filter.py
56 <../python/demos/demo_filter.py>`. This files executes the following:
58 * read an input media file (``aubio.source``)
60 * filter it using an `A-weighting <https://en.wikipedia.org/wiki/A-weighting>`_
61 filter (``aubio.digital_filter``)
63 * write result to a new file (``aubio.sink``)
65 .. literalinclude:: ../python/demos/demo_filter.py
71 Check out the `python demos folder`_ for more examples.
76 A number of `python tests`_ are provided. To run them, use
77 ``python/tests/run_all_tests``.
79 .. _python demos folder: https://github.com/aubio/aubio/blob/master/python/demos
80 .. _demo_filter.py: https://github.com/aubio/aubio/blob/master/python/demos/demo_filter.py
81 .. _python tests: https://github.com/aubio/aubio/blob/master/python/tests