[SciPy-user] audiolab

Laurent Perrinet Laurent.Perrinet at incm.cnrs-mrs.fr
Mon Nov 10 10:56:03 EST 2008


Hi!

You may find this example useful:

http://neuralensemble.org/trac/NeuroTools/browser/trunk/examples/single_neuron/playing_with_simple_single_neuron.py

We used scikits.audiolab to record a numpy array and pyaudio to play  
it on your computer.

(and btw, it's an educational example, not scientific!)

cheers
laurent

Le 10 nov. 08 à 10:28, Georg Holzmann a écrit :

>
> Hallo!
>
> If you want to have the exact commands:
>
> 1) build audiolab
> (http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/audiolab/)
>
> 2) in python:
>
> from scikits.audiolab import wavread, wavwrite
>
> # read a wave file
> (audiodata, samplingrate, encoding) = wavread("yourfile.wav")
>
> # write a wave file
> wavwrite(audiodata_as_numpy_array, "youroutputfile.wav", samplingrate)
>
> LG
> Georg
>
>
>
> David Cournapeau schrieb:
>> On Mon, Nov 10, 2008 at 2:40 AM, Nils Wagner
>> <nwagner at iam.uni-stuttgart.de> wrote:
>>> Hi all,
>>>
>>> How do I write numpy arrays to sound files ?
>>>
>>
>> If you have very basic needs, when python stdlib (as given by James'
>> example) is enough. If you want more control/other file format, then
>> audiolab may be more appropriate. There is a simple API (the so- 
>> called
>> matlab API) for wav, aiff, flac and a few other formats,
>>
>> David
>> _______________________________________________
>> SciPy-user mailing list
>> SciPy-user at scipy.org
>> http://projects.scipy.org/mailman/listinfo/scipy-user
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>




More information about the SciPy-User mailing list