I don't think there is a simple example of this. However, if I remember right, there are two ways to do the loop if you want to have overlapping windows or frames:

1) Read the whole audio from the audio file into a CLAM::Audio and manage the "chunk" you send to the SpectralAnalysis Do by advancing your read pointer by "hopsize" (which, if overlapping, will be less than windowSize)

2) Use ports and let them manage this for you. This is what you can see if you analyze the code in SMSAnalysisCore.cxx

http://clam-project.org/doc/CLAM-doxygen/SMSAnalysisCore_8cxx-source.html

If you don't need overlap, SpectralAnalysis will take care of everything (windowing, etc...) as long as you configure the parameters right so you don't need to worry about 1 or 2.

X

paul simmons wrote:
well, let me change the question then. is there a "code" sample for
doing spectral analysis with overlapping windows (ie using windowsize
and hopsize parameters)?



On Mon, Sep 7, 2009 at 8:24 PM, Pau Arumí<[email protected]> wrote:
Hi Paul,
I didn't understand exactly where the problem is.
(However I think the most qualified to answer you is David Garcia who is
currently on holidays. He'll be back in a week or two.)

Cheers
P

El dl 07 de 09 de 2009 a les 16:54 +0200, en/na paul simmons va
escriure:
Hi,
I am trying to do MFCC extraction. As far as I get; the steps are

Read an "Audio"
Run "SpectralAnalysis" on output of "Audio"
Run "MelFilterBank" on output of "SpectralAnalysis"
Run "CepstralTransform" on output of "MelFilterBank"

right?

If so; I cannot understand where to do looping, for example if I do:

    while(mReader.Do(audio))
    {
        spectralAnalysis.Do(audio, spectrum);
        melFilterBank.Do(spectrum, melSpectrum);
        cepstralTransform.Do(melSpectrum, melCepstrum);

        CLAM::XMLStorage::Dump(audio,"Audio",a);
        CLAM::XMLStorage::Dump(spectrum, "Spectrum",s);
        CLAM::XMLStorage::Dump(melSpectrum, "MelSpectrum",m);
        CLAM::XMLStorage::Dump(melCepstrum, "MelCepstrum",n);
    }

it applies mfcc to each read audio patch (mentioned by Audio.SetSize)
and got one MFCC feature vector. But I cannot understand how
WindowSize or HopSize is applied in this fashion. Because since Audio
is read in non-overlapping windows with mReader.Do(), overlapped
windows are run only for current audio part

I think there must be another , more correct way to get overlapping
windows continuesly in whole audio, but cannot find it. Any ideas?

Thanks...

_______________________________________________
Clam-devel mailing list
[email protected]
https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel
_______________________________________________
Clam-devel mailing list
[email protected]
https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel


_______________________________________________
Clam-devel mailing list
[email protected]
https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel


_______________________________________________
Clam-devel mailing list
[email protected]
https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel

Reply via email to