Hi guys,
I'm trying to make a specgram() for some wave samples that I have read into 'data' using pyaudiolab's read_frames() (put into wavread())

When I do

from wavread import *
from pylab import *
from statistics import *

data, datasize, samplerate, channels = wavread("myfile.wav")
specgram(data)

I get:
Warning: divide by zero encountered in log10
(array([[  2.26730611e-02,   1.51890672e-02,   7.78123371e-03, ...,
          0.00000000e+00,   0.00000000e+00,   0.00000000e+00],
       [  9.11969843e-03,   2.81931459e-03,   3.13995580e-03, ...,
          0.00000000e+00,   0.00000000e+00,   0.00000000e+00],
       [  7.25346631e-04,   4.83291216e-05,   2.59076878e-04, ...,
          0.00000000e+00,   0.00000000e+00,   0.00000000e+00],
       ...,
       [  5.19279887e-08,   1.53242938e-07,   1.46461798e-07, ...,
          0.00000000e+00,   0.00000000e+00,   0.00000000e+00],
       [  1.00769359e-07,   2.00314891e-07,   3.04618029e-07, ...,
          0.00000000e+00,   0.00000000e+00,   0.00000000e+00],
       [  2.86252093e-08,   5.42052713e-07,   1.50494595e-07, ...,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00]]), array([ 0. , 0.0078125, 0.015625 , 0.0234375, 0.03125 ,
        0.0390625,  0.046875 ,  0.0546875,  0.0625   ,  0.0703125,
        0.078125 ,  0.0859375,  0.09375  ,  0.1015625,  0.109375 ,
        0.1171875,  0.125    ,  0.1328125,  0.140625 ,  0.1484375,
        0.15625  ,  0.1640625,  0.171875 ,  0.1796875,  0.1875   ,
        0.1953125,  0.203125 ,  0.2109375,  0.21875  ,  0.2265625,
        0.234375 ,  0.2421875,  0.25     ,  0.2578125,  0.265625 ,
        0.2734375,  0.28125  ,  0.2890625,  0.296875 ,  0.3046875,
        0.3125   ,  0.3203125,  0.328125 ,  0.3359375,  0.34375  ,
        0.3515625,  0.359375 ,  0.3671875,  0.375    ,  0.3828125,
        0.390625 ,  0.3984375,  0.40625  ,  0.4140625,  0.421875 ,
        0.4296875,  0.4375   ,  0.4453125,  0.453125 ,  0.4609375,
        0.46875  ,  0.4765625,  0.484375 ,  0.4921875,  0.5      ,
        0.5078125,  0.515625 ,  0.5234375,  0.53125  ,  0.5390625,
        0.546875 ,  0.5546875,  0.5625   ,  0.5703125,  0.578125 ,
        0.5859375,  0.59375  ,  0.6015625,  0.609375 ,  0.6171875,
        0.625    ,  0.6328125,  0.640625 ,  0.6484375,  0.65625  ,
        0.6640625,  0.671875 ,  0.6796875,  0.6875   ,  0.6953125,
        0.703125 ,  0.7109375,  0.71875  ,  0.7265625,  0.734375 ,
        0.7421875,  0.75     ,  0.7578125,  0.765625 ,  0.7734375,
        0.78125  ,  0.7890625,  0.796875 ,  0.8046875,  0.8125   ,
        0.8203125,  0.828125 ,  0.8359375,  0.84375  ,  0.8515625,
        0.859375 ,  0.8671875,  0.875    ,  0.8828125,  0.890625 ,
        0.8984375,  0.90625  ,  0.9140625,  0.921875 ,  0.9296875,
        0.9375   ,  0.9453125,  0.953125 ,  0.9609375,  0.96875  ,
0.9765625, 0.984375 , 0.9921875, 1. ]), array ([ 6.40000000e+01, 1.28000000e+02, 1.92000000e+02, ..., 9.73440000e+04, 9.74080000e+04, 9.74720000e+04]), <matplotlib.image.AxesImage instance at 0x3324fa8>)

For another sample, I get a nice spectrogram. What can it be about my sample that would give me such an error? What is the error caused by? A Google on the error message provided me with nothing.

Sincerely yours

        Niklas Saers
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to