Hello. I'm working with audio signals with wavelet analisys, and I want to know if someone has work with some audio capture (with the mic and through a file) library so that I can get the time-series... Also I need to play the transformed signal. Thanks. * *"Solo existen 10 tipos de personas en el mundo... las que saben binario y las que no" _-`````-, ,- '- . .' .- - | | - -. `. /.' / `. \ :/ : _... ..._ `` : :: : /._ .`:'_.._\. || : :: `._ ./ ,` : \ . _.'' . `:. / | -. \-. \\_ / \:._ _/ .' .@) \@) ` `\ ,.' _/,--' .- .\,-.`--`. ,'/'' (( \ ` ) /'/' \ `-' ( '/'' `._,-----' ''/' .,---' ''/' ;: ''/'' ''/ ''/''/'' '/'/' `;
On 4-Feb-10, at 2:18 PM, Gerardo Gutierrez wrote:
I'm working with audio signals with wavelet analisys, and I want to know if someone has work with some audio capture (with the mic and through a file) library so that I can get the time-series... Also I need to play the transformed signal.
Peter Wang has an example using Chaco and ETS: https://svn.enthought.com/enthought/browser/Chaco/trunk/examples/advanced/sp... David Cournapeau has written a libsndfile wrapper: http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/audiolab/sphinx/in...
Gerardo Gutierrez wrote:
Hello.
I'm working with audio signals with wavelet analisys, and I want to know if someone has work with some audio capture (with the mic and through a file) library so that I can get the time-series...
I think the easiest for now is to record things in a file, and read this file using a library. I believe audiolab is the most complete solution when working with NumPy: I implemented audiolab to replace the missing functions in matlab, and it supports a lot of file formats as well as reading huge audio files without loading everything in memory. Its main drawback is the dependency on libsndfile. You can play numpy arrays with the play function (it uses ALSA) - having a record function would be good as well, but I never took the time to implement it (hint, hint :) ). cheers, David
hi, pyaudio is pretty good for recording audio. It is based on portaudio and has binaries available for win/mac - and is included in many linux distros too (so is pygame). You can load, and play audio with pygame. You can use the pygame.sndarray module for converting the pygame.Sound objects into numpy arrays. apt-get install python-pygame import pygame, pygame.sndarray, sys fname = sys.argv[1] pygame.init() sound = pygame.mixer.Sound(fname) an_array = pygame.sndarray.array(sound) Also see the sndarray demo: pygame.examples.sound_array_demos. `python -m pygame.examples.sound_array_demos` Other sndarray using examples can be found on pygame.org with the search function. Also audiolab uses bindings to libsndfile - so you can open a number of formats. However it is pretty new, so isn't packaged by distros(yet), and there are no mac binaries(yet). It's probably the best way to go if you can handle compiling it yourself and the dependency. cheers,
René Dudfield wrote:
Also audiolab uses bindings to libsndfile - so you can open a number of formats. However it is pretty new, so isn't packaged by distros(yet), and there are no mac binaries(yet). It's probably the best way to go if you can handle compiling it yourself and the dependency.
There are actually Mac binaries, just not for the last version: http://pypi.python.org/pypi/scikits.audiolab/0.10.0 David
participants (4)
-
David Cournapeau -
David Warde-Farley -
Gerardo Gutierrez -
René Dudfield