A flexible I/O library for audio files in Python.
Why another audio file library? There are two (and a half) reasons you may want to use audiophile
(over audioread):
- We use SoX under the hood: SoX is nice, fast, and codec support is diverse. You should use it.
- Frame-based generators: Audio signals are often (easily) processed in frames / windows / blocks of samples. Because blocks are yielded as read,
audiophile
can handle arbitrarily long audio files, which might be challenging for long (≈hours) recordings. - (Coming soon) Abstracted overlap-and-add file-writing: It is on the roadmap (admittedly, without a timeline) to provide a simple interface for writing blocks of audio back to a rolling buffer.
The easiest way to install audiophile
is with pip:
$ pip install git+git://github.com/ejhumphrey/audiophile.git
Alternatively, you can clone the repository and do it the hard way:
$ cd ~/to/a/good/place
$ git clone https://github.com/ejhumphrey/audiophile.git
$ cd audiophile
$ python setup.py build
$ [sudo] python setup.py install
Clone the repository and run the tests directly; nose
is recommended, and installed as a dependency:
$ cd {wherever_you_cloned_it}/audiophile
$ nosetests
... more to come // see the tests in the meantime ...