<p dir="ltr">Wow, buenísimo resumen. Gracias por compartir!</p>
<div class="gmail_quote">On Oct 20, 2015 2:45 PM, "Jaime Perea" <<a href="mailto:jdpd@gmx.es">jdpd@gmx.es</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">El Martes, 20 de octubre de 2015 14:27:42 Jesus Cea escribió:<br>
> Para el podcast me he escrito un programa que usar la libería "pyaudio"<br>
> que me da acceso al micrófono del ordenador ocultándome lo que tengo por<br>
> debajo (por ejemplo, PulseAudio). El problema es que esa librería solo<br>
> funciona en Linux y en Macintosh (instalando cosas a mano). Necesitaría<br>
> también algo que funcionase en Windows, por ejemplo.<br>
><br>
> ¿Alguna sugerencia?. ¿Algo que funcione en Linux modernos, Mac (a poder<br>
> ser instalando lo mínimo posible) y Windows?.<br>
<br>
Esto salió en la lista de usuario de scipy en el contexto de usar numpy para<br>
sonido. Corto y pego a continuación:<br>
<br>
<br>
On Tue, Mar 31, 2015 at 6:02 PM, Todd <<a href="mailto:toddrjen@gmail.com">toddrjen@gmail.com</a>> wrote:<br>
On Tue, Mar 24, 2015 at 9:39 PM, Todd <<a href="mailto:toddrjen@gmail.com">toddrjen@gmail.com</a>> wrote:<br>
Is anyone aware of a well-maintained, simple, cross-platform python package<br>
that can play a numpy array as sound over speakers?<br>
<br>
I am aware of <a href="https://wiki.python.org/moin/Audio/" rel="noreferrer" target="_blank">https://wiki.python.org/moin/Audio/</a>. However, in all the cases<br>
there, as far as I can find they either do not support numpy arrays, are not<br>
cross-platform, cannot playback sound at all, or are unmaintained. There is<br>
also PySoundCard, which would do what I need but also appears to be<br>
unmaintained (no release in over a year, and no commits in 5 months, no<br>
release with serious bugfixes mentioned in commits).<br>
<br>
So in terms of raw waveform playback (as opposed to music note playback), I<br>
have done some more searching and I think I have found something that works.<br>
It is the "<a href="http://audio.io" rel="noreferrer" target="_blank">audio.io</a>" package (<a href="https://pypi.python.org/pypi/audio.io/" rel="noreferrer" target="_blank">https://pypi.python.org/pypi/audio.io/</a>). It has<br>
a recent release (late 2014), supports numpy arrays, and is cross-platform<br>
through PyAudio. It is just a VERY thin wrapper around PyAudio (less than 100<br>
lines). However, there is no website, no issue tracker, essentially no<br>
documentation, and has several projects copied into its tarball (including<br>
setputools, about, and sh).<br>
<br>
Here are the reasonably maintained, reasonably relevant alternatives I have<br>
been able to find:<br>
<br>
PyAudio: maintained, cross-platform, doesn't support numpy. It seems to be<br>
used as a backend by a lot of other projects.<br>
<br>
audiolazy: cross-platform, supports numpy, has not seen a release since 2013<br>
but its github repo is still seeing commits so it may have more releases in<br>
the future. Uses PyAudio. Provides a lot of other powerful audio-handling<br>
and audio-processing capabilities.<br>
<br>
PySoundCard: cross-platform, supports numpy, has not seen a release in over a<br>
year and its github repo has not seen a commit in 5 months, but another<br>
related project (PySoundFile) has seen commits and releases recently. The<br>
only option amongst these that does NOT rely on PyAudio.<br>
<br>
pydub: maintained, cross-platform, doesn't appear to support numpy but the<br>
audio output is undocumented so I can't be sure. Uses PyAudio or ffmpeg if<br>
PyAudio is not available.<br>
<br>
<br>
<br>
Just an update on cross-platform, numpy-compatible sound I/O packages:<br>
<br>
I have found some other possibilities:<br>
<br>
The "JACK-Client" package (<a href="https://pypi.python.org/pypi/JACK-Client/" rel="noreferrer" target="_blank">https://pypi.python.org/pypi/JACK-Client/</a>) is the<br>
furthest along and most established. It has been around for almost a year,<br>
has three contributors, and has seen four releases. However, it has gained<br>
built-in numpy support since my last update, which is why it hasn't appeared<br>
previously. The maintainer seems to be a member of an established auditory<br>
research group with a good open-source software track record. It seems to be<br>
a traditionally MATLAB group but they are adding more and more python<br>
packages.<br>
<br>
The "sounddevice" package (<a href="https://pypi.python.org/pypi/sounddevice/" rel="noreferrer" target="_blank">https://pypi.python.org/pypi/sounddevice/</a>). It<br>
only has only been around for a few months and only has one contributor so<br>
far. However, the maintainer is the same as the maintainer of the "JACK-<br>
Client" package, it has a github repo with continued commits, a couple other<br>
people submitting issues. Since "JACK-Client" seems to have done okay, I hope<br>
this package will as well.<br>
<br>
The "hear" package (<a href="https://pypi.python.org/pypi/Hear/" rel="noreferrer" target="_blank">https://pypi.python.org/pypi/Hear/</a>) is in a similar<br>
situation, although with a different maintainer. It has been around about the<br>
same amount of time, has about the same number of releases, and only has one<br>
contributor. The maintainer seems to have a good track record with open-<br>
source software and experience with sound processing, so it has some promise<br>
too.<br>
<br>
Otherwise, there has been no change. None of the other packages I listed that<br>
support numpy have seen a release in the last year.<br>
_______________________________________________<br>
SciPy-User mailing list<br>
<a href="mailto:SciPy-User@scipy.org">SciPy-User@scipy.org</a><br>
<a href="https://mail.scipy.org/mailman/listinfo/scipy-user" rel="noreferrer" target="_blank">https://mail.scipy.org/mailman/listinfo/scipy-user</a><br>
_______________________________________________<br>
Python-es mailing list<br>
<a href="mailto:Python-es@python.org">Python-es@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-es" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-es</a><br>
FAQ: <a href="http://python-es-faq.wikidot.com/" rel="noreferrer" target="_blank">http://python-es-faq.wikidot.com/</a><br>
</blockquote></div>