import scipy.io.wavfile as wav
import numpy
import warnings

def wavread(filename):
	with warnings.catch_warnings():
		warnings.simplefilter("ignore")
		fs,x = wav.read(filename)
	maxv = numpy.iinfo(x.dtype).max
	x = x.astype('float')
	x = x / maxv
	return (fs,x)

def wavwrite(filename, fs, x):
	maxv = numpy.iinfo(numpy.int16).max
	x /= numpy.max(numpy.abs(x),axis=0);
	x *= maxv;
	x = x.astype('int16')
	wav.write(filename, fs, x)
import scipy.io.wavfile as wav
import numpy
import warnings

def wavread(filename):
	with warnings.catch_warnings():
		warnings.simplefilter("ignore")
		fs,x = wav.read(filename)
	maxv = numpy.iinfo(x.dtype).max
	return (fs,x.astype('float') / maxv)

def wavwrite(filename, fs, x):
	maxv = numpy.iinfo(numpy.int16).max
	wav.write(filename, fs, (x * maxv).astype('int16'))

Test fuer WAV write und read gleichheit
Test fuer WAV write und read gleichheit
