As I am currently about to build a device based on a Raspberry Pi for measuring some stuff from noise recorded with a sound card (e.g. variance), and trying to do this withi
Try use "numpy.fromstring" function to replace "struct.unpack":
import numpy stream = p.open(format=FORMAT,channels=1,rate=SAMPLEFREQ,input=True,frames_per_buffer=FRAMESIZE) data = stream.read(NOFFRAMES*FRAMESIZE) decoded = numpy.fromstring(data, 'Float32');
let me know if this works for you