[CLAM] Re: [CLAM] CepstralTransform

Rhywek rhywek at o2.pl
Mon Jul 18 06:35:00 PDT 2005


> I also don't know exactly what is happening there but i can give
you some 
> hints on debugging CLAM. Firstly, you should compile with
CONFIG='debug'. 
I do this.
> CXXFLAGS options are overwritten by the CONFIG selection. We found
kdbg and 
> ddd being good graphical front ends for gdb you could use them for
easier 
> debugging.
Thanks, I will check them.

>DynamicTypes, like MelCepstrum, have some limitations with 
> debuggers inspection, you should print them in XML as you already did.

Yes I did it and it gives absolutely no clue about what is wrong. On
one step it is OK, but the next one gives only zeros, so I wanted to
inspect what is going on in the meantime. And to do that I want to
inspect simple int, double, std::vector, etc. and not dynamic types,
but I cannot do this. Anyone has a clue how I could do that?

And still if there is someone with CLAM experience who could take a
look at my code and say what is wrong, I would highly appreciate that.

> 
> A Dilluns 18 Juliol 2005 14:05, Rhywek va escriure:
> > Hello, all.
> > I am running into a problem with MFCC extraction. Here is the
relevant
> > code:
> >
> > ...
> >       CLAM::XMLStorage::Dump(melSpectrum,
> >                    "melSpectrum",
> >                    "debugmelSpectrum.xml");
> >
> >         CLAM::CepstralTransformConfig cepstralTransformConfig;
> >
> >
> >
cepstralTransformConfig.SetNumMelCoefficients(floor(3*log(fs)));//It is
> > 30 here
> >         cepstralTransformConfig.SetNumCepstrumCoefficients(13);
> >         cepstralTransformConfig.SetUseBase10(false);
> >
> >         CLAM::CepstralTransform
cepstralTransform(cepstralTransformConfig);
> >
> >         CLAM::MelCepstrum melCepstrum;
> >
> >         cepstralTransform.Start();
> >
> >         cepstralTransform.Do(melSpectrum,melCepstrum);
> >
> >         cepstralTransform.Stop();
> >
> >         CLAM::XMLStorage::Dump(melCepstrum,"MFCC","MFCC.xml");
> > ...
> >
> > After execution the file "debugmelSpectrum.xml" contains one
long line:
> >
<melSpectrum><SpectralRange>22050</SpectralRange><CenterTime>0</CenterTime>
> ><Lo
> >
wCutoff>0</LowCutoff><HighCutoff>22050</HighCutoff><NumBands>30</NumBands><
> >Coe fficients size="30">189.915 132.907 44.3864 34.6573 16.0021
26.2483
> > 28.6773 17
> > .0859 38.7323 15.6943 17.6948 83.4548 52.0764 41.1847 25.1965
10.6456
> > 11.1537
> > 6.51261 4.43087 4.85767 4.84433 4.58867 4.33651 4.24629 4.20944
3.9518
> > 3.70034
> >  3.66503 3.54066 3.77783</Coefficients></melSpectrum>
> >
> > I suppose it is correct data.
> > But the file "MFCC.xml" contains oneline line:
> >
<MFCC><CenterTime>0</CenterTime><LowCutoff>0</LowCutoff><HighCutoff>22050</
> >Hig hCutoff><Coefficients size="13">0 0 0 0 0 0 0 0 0 0 0 0
> > 0</Coefficients></MFCC>
> >
> > Now why the coefficients are all 0? I browsed the code of the Do
method
> > and it should work as it is... I also wanted to debug it, but I
ran into
> > different problem - I could not see the variables and objects. I
use gdb
> > for debugging and if I write "p melFloor" or any other local
variable,
> > it complains. So I tried to make it like this:
> > CXXFLAGS="-ggdb" make CONFIG=release -C build
> > but then I set the breakpoint like:
> > b CLAM::CepstralTransform::Do(CLAM::MelSpectrum const&,
CLAM::MelCepstrum&)
> > But when I run the program with "run", the debugging was hardly
> > possible. When I tried to list the code with "l" it shown
something like:
> > 1      <<C++-namespaces>>: No such file or directory.
> >        in <<C++-namespaces>>
> >
> > So could you please give me some hints how to debug CLAM
programs in gdb?
> >
> > Thanks in advance,
> > Rhywek.
> >
> >
> >
> > _______________________________________________
> > CLAM mailing list
> > CLAM at iua.upf.es
> > http://www.iua.upf.es/mtg/clam
> 
> -- 
> David García Garzón <david.garcia at removespam.iua.upf.es>
> Phone: 034 93 542 21 99
> Music Technology Group, Institut Universitari de l'Audiovisual
> Universitat Pompeu Fabra
> 
> -- 
> David García Garzón <david.garcia at removespam.iua.upf.es>
> Phone: 034 93 542 21 99
> Music Technology Group, Institut Universitari de l'Audiovisual
> Universitat Pompeu Fabra
> 
> 
> _______________________________________________
> CLAM mailing list
> CLAM at iua.upf.es
> http://www.iua.upf.es/mtg/clam
> 






More information about the clam-users mailing list