[SciPy-User] Playing numpy array over speakers

Hjalmar Turesson hturesson at gmail.com
Tue Mar 24 17:27:30 EDT 2015


I have a little function that plays back numpy arrays using PyAudio. I
think PyAudio is pretty platform independent (but it takes a bit of
installing). My code is not perfect, but it is simple and works ok. Want it?

Hjalmar

On Tue, Mar 24, 2015 at 6:15 PM, Todd <toddrjen at gmail.com> wrote:

>
> On Mar 24, 2015 9:51 PM, "Kiko" <kikocorreoso at gmail.com> wrote:
> >
> >
> >
> > 2015-03-24 21:39 GMT+01:00 Todd <toddrjen at gmail.com>:
> >>
> >> 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).
> >
> >
> > Could this be useful for your use case?
> http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/examples/Interactive%20Widgets/Beat%20Frequencies.ipynb
> >
>
> Sorry, I should have been more specific.  I am really looking for a way to
> play audio as part of a script.  Your link would certainly work for playing
> back sound in an interactive manner in a notebook. However, it is not
> really useful as part general-purpose script or function,  or when control
> of the playback is needed. Thank you, though, that is certainly very useful
> in many situations.
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20150324/31d9f6a4/attachment.html>


More information about the SciPy-User mailing list