You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just ran into that error, under MacOs 10.6 (Snow Leopard): I have some data array for a stereo audio file, with sampling rate 44.1kHz. While I usually prefer to avoid playing the sound from the Python interpreter (I use ipython -pylab), I just wondered if my old install worked. As a matter of fact, when I read data using audiolab (Sndfile or with wavread), then I get an array which cannot be played "as is"! It seems that it needs to be transposed so that it works (see the output error below).
I guess it's just about changing the number of channels in the soundio/play.py file. At least, it feels that there should be some compatibility between the way the data is stored in the array from the read functions, and the way it is handled in the method play. What do you think? My installation is not recent, but never really tried that before (actually probably ran into that error before, but never dug much into it). From my understanding, I don't believe that's due to my installation configuration, but if you need more details, I can dig a bit more.
Also, I m just wondering: while the wrapper seems to work fine and rely on libsndfile for all "advanced" stuff, is there gonna be any further development effort on this project? Is it still active? (and does it need to be active at all, anyway ?!!) Always thought that module would be perfect if included in some "bigger" module, such as numpy or more likely scipy, so that there is even less barrier for audio signal processing researcher who want to come from Matlab to Python!
Here is the output of the error:
In [24]: data.shape
Out[24]: (1767316, 2)
In [25]: fs
Out[25]: 44100
In [26]: al.play(data,fs)
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
/Users/.../<ipython-input-26-8ecea18253de> in <module>()
----> 1 al.play(data,fs)
/Users/.../Library/Python/2.7/lib/python/site-packages/scikits.audiolab-0.11.0-py2.7-macosx-10.5-x86_64.egg/scikits/audiolab/soundio/play.pyc in play(input, fs)
107 handle mono on its own.
108 """
--> 109 return _play(input, fs)
/Users/.../Library/Python/2.7/lib/python/site-packages/scikits.audiolab-0.11.0-py2.7-macosx-10.5-x86_64.egg/scikits/audiolab/soundio/play.pyc in _play(input, fs)
79 "Only input of rank 1 and 2 supported for now."
80
---> 81 dev = CoreAudioDevice(fs=fs, nchannels=nc)
82 dev.play(input)
83 else:
/Users/.../Library/Python/2.7/lib/python/site-packages/scikits.audiolab-0.11.0-py2.7-macosx-10.5-x86_64.egg/scikits/audiolab/soundio/macosx_backend.so in macosx_backend.CoreAudioDevice.__init__ (scikits/audiolab/soundio/macosx/macosx_backend.c:1077)()
RuntimeError: Error while setting stream format.
In [27]: al.play(data.T,fs) # this works just fine
In [28]:
Cheers!
Jean-Louis
The text was updated successfully, but these errors were encountered:
Sorry for the late answer, for some reasons, I did not have GH set up to ping me on updates on this project.
Audiolab will not be included in scipy or numpy for two reasons: first, the license of libsndfile is not BSD, and we want to ensure pure BSD for numpy/scipy. Second, even if the license were compatible, it would add some dependency: numpy/scipy are hard enough to build already. There may be a way to include it in the 'gpl/lgpl eggs' set of EPD (that you can use for free within an academic institution), but that's not just my decision to make :)
Regarding audiolab development, I realistically won't have time to make the package much better than its current state. I will take some time to fix most bugs that have been mentioned the last 2 years or so, maybe add support for python 3, but won't go much further.
Hi David,
Just ran into that error, under MacOs 10.6 (Snow Leopard): I have some data array for a stereo audio file, with sampling rate 44.1kHz. While I usually prefer to avoid playing the sound from the Python interpreter (I use
ipython -pylab
), I just wondered if my old install worked. As a matter of fact, when I read data usingaudiolab
(Sndfile
or withwavread
), then I get an array which cannot be played "as is"! It seems that it needs to be transposed so that it works (see the output error below).I guess it's just about changing the number of channels in the soundio/play.py file. At least, it feels that there should be some compatibility between the way the data is stored in the array from the
read
functions, and the way it is handled in the methodplay
. What do you think? My installation is not recent, but never really tried that before (actually probably ran into that error before, but never dug much into it). From my understanding, I don't believe that's due to my installation configuration, but if you need more details, I can dig a bit more.Also, I m just wondering: while the wrapper seems to work fine and rely on libsndfile for all "advanced" stuff, is there gonna be any further development effort on this project? Is it still active? (and does it need to be active at all, anyway ?!!) Always thought that module would be perfect if included in some "bigger" module, such as
numpy
or more likelyscipy
, so that there is even less barrier for audio signal processing researcher who want to come from Matlab to Python!Here is the output of the error:
Cheers!
Jean-Louis
The text was updated successfully, but these errors were encountered: