I would like to read and write audio in Python. I tried PyAudio and audiolab, but both only do blocking audio I/O (ie you can't do anything else while they play or record).
Now I would need a library that does non-blocking audio I/O on OSX. Bonus points for LGPL/BSD license, compatibility with pip and playback of numpy arrays!
A few days ago, I submitted a patch to pyAudio that enables non blocking audio I/O there.
As of Version 0.2.7, the patch is in. Now non-blocking I/O is officially supported by PyAudio.
Have you taken a look at Pygame? It's a very comprehensive wrapper around the SDL library and it will allow you to queue up and play music while doing other processing.
http://www.pygame.org/docs/ref/mixer.html
It also has routines for converting between pygame Sound objects and Numpy arrays.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.