[SciPy-User] Playing numpy array over speakers

Sameer Grover sameer.grover.1 at gmail.com
Fri Oct 16 11:42:54 EDT 2015


On 16/10/15 19:20, Todd wrote:
> On Tue, Mar 31, 2015 at 6:02 PM, Todd <toddrjen at gmail.com 
> <mailto:toddrjen at gmail.com>> wrote:
>
>     On Tue, Mar 24, 2015 at 9:39 PM, Todd <toddrjen at gmail.com
>     <mailto:toddrjen at gmail.com>> wrote:
>
>         Is anyone aware of a well-maintained, simple, cross-platform
>         python package that can play a numpy array as sound over
>         speakers?
>
>         I am aware of https://wiki.python.org/moin/Audio/. However, in
>         all the cases there, as far as I can find they either do not
>         support numpy arrays, are not cross-platform, cannot playback
>         sound at all, or are unmaintained. There is also PySoundCard,
>         which would do what I need but also appears to be unmaintained
>         (no release in over a year, and no commits in 5 months, no
>         release with serious bugfixes mentioned in commits).
>
>
>     So in terms of raw waveform playback (as opposed to music note
>     playback), I have done some more searching and I think I have
>     found something that works.  It is the "audio.io
>     <http://audio.io>" package
>     (https://pypi.python.org/pypi/audio.io/). It has a recent release
>     (late 2014), supports numpy arrays, and is cross-platform through
>     PyAudio.  It is just a VERY thin wrapper around PyAudio (less than
>     100 lines).  However, there is no website, no issue tracker,
>     essentially no documentation, and has several projects copied into
>     its tarball (including setputools, about, and sh).
>
>     Here are the reasonably maintained, reasonably relevant
>     alternatives I have been able to find:
>
>     PyAudio: maintained, cross-platform, doesn't support numpy.  It
>     seems to be used as a backend by a lot of other projects.
>
>     audiolazy: cross-platform, supports numpy, has not seen a release
>     since 2013 but its github repo is still seeing commits so it may
>     have more releases in the future.  Uses PyAudio.  Provides a lot
>     of other powerful audio-handling and audio-processing capabilities.
>
>     PySoundCard: cross-platform, supports numpy, has not seen a
>     release in over a year and its github repo has not seen a commit
>     in 5 months, but another related project (PySoundFile) has seen
>     commits and releases recently.  The only option amongst these that
>     does NOT rely on PyAudio.
>
>     pydub: maintained, cross-platform, doesn't appear to support numpy
>     but the audio output is undocumented so I can't be sure.  Uses
>     PyAudio or ffmpeg if PyAudio is not available.
>
>
>
> Just an update on cross-platform, numpy-compatible sound I/O packages:
>
> I have found some other possibilities:
>
> The "JACK-Client" package (https://pypi.python.org/pypi/JACK-Client/) 
> <https://pypi.python.org/pypi/JACK-Client/> is the furthest along and 
> most established.  It has been around for almost a year, has three 
> contributors, and has seen four releases.  However, it has gained 
> built-in numpy support since my last update, which is why it hasn't 
> appeared previously.  The maintainer seems to be a member of an 
> established auditory research group with a good open-source software 
> track record.  It seems to be a traditionally MATLAB group but they 
> are adding more and more python packages.
>
> The "sounddevice" package (https://pypi.python.org/pypi/sounddevice/). 
> It only has only been around for a few months and only has one 
> contributor so far.  However, the maintainer is the same as the 
> maintainer of the "JACK-Client" package, it has a github repo with 
> continued commits, a couple other people submitting issues.  Since 
> "JACK-Client" seems to have done okay, I hope this package will as well.
>
> The "hear" package (https://pypi.python.org/pypi/Hear/) is in a 
> similar situation, although with a different maintainer.  It has been 
> around about the same amount of time, has about the same number of 
> releases, and only has one contributor.  The maintainer seems to have 
> a good track record with open-source software and experience with 
> sound processing, so it has some promise too.
>
> Otherwise, there has been no change. None of the other packages I 
> listed that support numpy have seen a release in the last year.
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> https://mail.scipy.org/mailman/listinfo/scipy-user

https://github.com/standarddeviant/sound4python

I've used this on linux. According to the documentation, it is supposed 
to work on windows too.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20151016/bb3a0907/attachment.html>


More information about the SciPy-User mailing list