[SciPy-user] scipy tutorials
Gary Ruben
gruben at bigpond.net.au
Fri Jun 24 22:19:26 EDT 2005
Hi Matt,
First, thanks for producing and advertising the existence of these.
I thought I'd try your Echo Cancellation tute. A few problems I found:
The comment "the python sound docs at python.org are an excellent
resource." isn't enough info for me to easily find the docs you're
talking about - in fact I quickly gave up. Perhaps adding a "search for
'foo'" would help.
You need to add a line to make it stand-alone:
>>> from scipy import *
The first time I tried this:
>>> original_signal[i] = struct.unpack('B',osf.readframes(1))[0]
I got a traceback
Traceback (most recent call last):
File "<pyshell#22>", line 2, in -toplevel-
original_signal[i] = struct.unpack('B',osf.readframes(1))[0]
error: unpack str size does not match format
so presumably there are restrictions on the .wav file format. I tried a
different .wav file and it worked fine. Perhaps providing a short .wav
file of the correct format would be a good idea. In fact, I found that
the .wav I use locks up at the correlation step, presumably because it's
too big (65k ~ 5 seconds), so at least put a comment in to keep the .wav
of the order of a second. I'll try again later.
Half-way through you change from using original_signal to osig
This needs fixing.
You haven't shown the commands to produce the waveform plots.
Something simple like
>>> from pylab import *
>>> plot(csig)
[<matplotlib.lines.Line2D instance at 0x028909B8>]
>>> show()
unless you want to assume usage with Ipython in interactive mode.
I had a quick look at the DTMF tute. Since, this contains plotting
instructions, I assume it is intended to be done before the Echo
Cancellation tute. This needs commenting or at a minimum reordering of
the links on the webpage.
I haven't run through it, but I noticed there's a syntax-error
generating typo:
>>> From scipy import *
^
lower case
Hope this helps,
Gary R.
Matt Fishburn wrote:
> Hello all,
>
> I've written some basic scipy tutorials, located at:
>
> http://scipy.mit.edu/
>
> The tutorials are meant to be a resource to people starting to work with
> scipy/matplotlib/ipython. A few more tutorials should be coming over
> the next month or so. Please let me have any feedback - if you find the
> tutorials useful, if you thought something wasn't explained well, etc.
>
> -Matt Fishburn
More information about the SciPy-User
mailing list