[CLAM] CepstralTransform

Rhywek rhywek at o2.pl
Mon Jul 18 05:05:56 PDT 2005

Hello, all.
I am running into a problem with MFCC extraction. Here is the relevant code:


        CLAM::CepstralTransformConfig cepstralTransformConfig;

cepstralTransformConfig.SetNumMelCoefficients(floor(3*log(fs)));//It is
30 here

        CLAM::CepstralTransform cepstralTransform(cepstralTransformConfig);

        CLAM::MelCepstrum melCepstrum;




After execution the file "debugmelSpectrum.xml" contains one long line:
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
6.51261 4.43087 4.85767 4.84433 4.58867 4.33651 4.24629 4.20944 3.9518
 3.66503 3.54066 3.77783</Coefficients></melSpectrum>

I suppose it is correct data.
But the file "MFCC.xml" contains oneline line:
hCutoff><Coefficients size="13">0 0 0 0 0 0 0 0 0 0 0 0

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,

More information about the clam-users mailing list