[Numpy-discussion] Converting audio data to array for further processing

David Cournapeau cournape@gmail....
Mon Aug 25 23:45:12 CDT 2008


On Mon, Aug 25, 2008 at 4:25 PM, Dan Colesworthy
<ColesworthyD@otologics.com> wrote:
> Hello all,
>
>
>
> I need an efficient way to convert 24 bit signed audio data to a numpy array
> for further processing.  The data will be in a .wav file, and can be
> recovered via the python wave module.  At that point it is a byte string –
> likely in little endian order.

There are some wav io facilities in scipy.io.

If you need more advanced facilities and ndo not ming using
LGPL-licensed code, there is scikits.audiolab which is a wrapper
around sndfile and supports a large range of audio file formats:

http://www.mega-nerd.com/libsndfile/
http://projects.scipy.org/scipy/scikits

david


More information about the Numpy-discussion mailing list