[SciPy-User] butterworth filter on .WAV file

Joshua Holbrook josh.holbrook@gmail....
Wed Jul 7 16:55:47 CDT 2010

On Wed, Jul 7, 2010 at 1:34 PM, Peter Howard <peterhoward42@gmail.com> wrote:
> I forgot to mention that part - it plays without complaint in Window's Media
> Player - but is completely silent.
> Would it help if I provide the input .WAV file?
> Can you attach things to posts via email?
> (It is 13MB)
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

That's huge! Nevermind that.

Interestingly enough, I tried messing with the problem using a random
wav file I found from the internet (that plays in vlc just fine) and
got an ugly error. So, I guess I can't help you in this way :S

That said, here's what I would do: First, plot the array that results
from reading the wav file to get an idea of what it looks like. Then,
after you butterworth it up, plot the result of THAT to see what you
have. That could give you an idea as to whether the problem is in the
reading, the butterworthing, the output, or whatever.

Just my $0.02. Good luck!



If anyone cares about the error I got, here you go:

In [12]: a,b=wavfile.read('viacom2.wav')
Reading fmt chunk
Reading data chunk
Warning:  %s chunk not understood
error                                     Traceback (most recent call last)

/home/josh/<ipython console> in <module>()

/usr/lib/python2.6/site-packages/scipy/io/wavfile.pyc in read(file)
     65         else:
     66             print "Warning:  %s chunk not understood"
---> 67             size = struct.unpack('I',fid.read(4))[0]
     68             bytes = fid.read(size)
     69     fid.close()

error: unpack requires a string argument of length 4

The file could be borked for all I know, and maybe this was fixed a
long time ago and my scipy package (probably stock fedora) could be a
bit stale, but the %s bit makes me think that maybe that part wasn't
completely finished? Anyways.

More information about the SciPy-User mailing list