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``:
20 From ``aubio`` source directory, run the following:
26 $ sudo ./setup.py install
31 Once you have python-aubio installed, you should be able to run ``python -c
32 "import aubio; print(aubio.version)"``.
37 Here is a :download:`simple script <../python/demos/demo_source_simple.py>`
38 that reads all the samples from a media file:
40 .. literalinclude:: ../python/demos/demo_source_simple.py
43 Filtering an input sound file
44 .............................
46 Here is a more complete example, :download:`demo_filter.py
47 <../python/demos/demo_filter.py>`. This files executes the following:
49 * read an input media file (``aubio.source``)
51 * filter it using an `A-weighting <https://en.wikipedia.org/wiki/A-weighting>`_
52 filter (``aubio.digital_filter``)
54 * write result to a new file (``aubio.sink``)
56 .. literalinclude:: ../python/demos/demo_filter.py
62 Check out the `python demos folder`_ for more examples.
67 A number of `python tests`_ are provided. To run them, use
68 ``python/tests/run_all_tests``.
70 .. _python demos folder: https://github.com/aubio/aubio/blob/master/python/demos
71 .. _demo_filter.py: https://github.com/aubio/aubio/blob/master/python/demos/demo_filter.py
72 .. _python tests: https://github.com/aubio/aubio/blob/master/python/tests