[Clam-devel] MFCC Loops

paul simmons pauls631 at gmail.com
Mon Sep 7 14:58:44 PDT 2009


And what is the use for hopsize then at that situation?



On Tue, Sep 8, 2009 at 12:42 AM, Xavier Amatriain<xavier at amatriain.net> wrote:
> The audio is simply "trimmed" to WindowSize. Look at line 141:
>
> http://clam-project.org/doc/CLAM-doxygen/SpectralAnalysis_8cxx-source.html#l00134
>
> paul simmons wrote:
>>
>> A more clear question, sorry for two posts; what happens when I send
>> an audio of size larger than SpectrumConfig.WindowSize() ?
>>
>>
>>
>> On Tue, Sep 8, 2009 at 12:27 AM, paul simmons<pauls631 at gmail.com> wrote:
>>
>>>
>>> Hi,
>>> I think the problem is about my SpectralAnalysis config. Just to
>>> clarify; I send an audio as the code below, at each while() iteration,
>>> it reads a chunk of audio (in size of Audio.SetSize()) and returns
>>> just one spectrum, melspectrum and mfcc vector (ok, let's put
>>> overlapping for a moment). But if you say SpectralAnalysis handles
>>> everything (and I configure right), I think I should get an array of
>>> spectrum (and others) vector according to the HopSize right? What is
>>> my mistake here?
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Sep 8, 2009 at 12:01 AM, Xavier Amatriain<xavier at amatriain.net>
>>> wrote:
>>>
>>>>
>>>> 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í<pau.arumi at barcelonamedia.org>
>>>>> 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
>>>>>>> Clam-devel at llistes.projectes.lafarga.org
>>>>>>>
>>>>>>>
>>>>>>> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Clam-devel mailing list
>>>>>> Clam-devel at llistes.projectes.lafarga.org
>>>>>>
>>>>>> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Clam-devel mailing list
>>>>> Clam-devel at llistes.projectes.lafarga.org
>>>>>
>>>>> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Clam-devel mailing list
>>>> Clam-devel at llistes.projectes.lafarga.org
>>>>
>>>> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel
>>>>
>>>>
>>
>> _______________________________________________
>> Clam-devel mailing list
>> Clam-devel at llistes.projectes.lafarga.org
>> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel
>>
>
>
> _______________________________________________
> Clam-devel mailing list
> Clam-devel at llistes.projectes.lafarga.org
> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel
>




More information about the clam-devel mailing list