[SciPy-user] from 1-d array to wave file?

massimo sandal massimo.sandal@unibo...
Wed Oct 24 06:12:42 CDT 2007


Hi,

Is there an easy way to transform a vector of data into a wave file?
Let's say, if I have something like:

import numpy as np
a=np.arange[0,100,0.1]
b=[np.sin(item) for item in a]

how can I convert b into a wave file (with given sampling rate, etc.)? 
Is there an easy recipe?

Thanks,
m.

-- 
Massimo Sandal
University of Bologna
Department of Biochemistry "G.Moruzzi"

snail mail:
Via Irnerio 48, 40126 Bologna, Italy

email:
massimo.sandal@unibo.it

tel: +39-051-2094388
fax: +39-051-2094387
-------------- next part --------------
A non-text attachment was scrubbed...
Name: massimo.sandal.vcf
Type: text/x-vcard
Size: 274 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-user/attachments/20071024/3d790463/attachment.vcf 


More information about the SciPy-user mailing list