SPEAR - using only 12 MFCC?

81 views
Skip to first unread message

Neve Stagy

unread,
Jun 23, 2017, 9:32:10 PM6/23/17
to bob-devel
Hello all,

Is it possible to configure SPEAR to utilize only 12 MFCC features (without any deltas)? I've created a custom mfcc-12.py with the following:

    pre_emphasis_coef=0.97, # as per the algorithm implemented in the paper
    n_ceps=12, # number of MFCC coefficients should be 20 - this is the number we cut off from whole Cepstrum
    n_filters=12, # number of filters in the bank is also 20
    win_length_ms=20.,  # 20 ms - this is the value in the paper
    win_shift_ms=10.,  # This is the overlap - half of the window
    f_max=8000,  # this number insures we take half of the frequencies after FFT - so we retain only 257 values for 512 window
    mel_scale=True,  # Mel-scaling is what make these MMFC features
    with_delta=True,
    with_delta_delta=True,
    energy_filter =True,
    dct_norm = True, # The paper uses normed DCT-II variant
    delta_win=1, # the paper computes deltas on window of size 1

However, I cannot set either with_delta or with_delta_delta to false without encountering the following error:
raise ValueError("vad_filter_features(): data sample is empty, no features extraction is possible")
ValueError: vad_filter_features(): data sample is empty, no features extraction is possible

Any suggestions?  

Best,
-Steve

Neve Stagy

unread,
Jun 27, 2017, 1:39:04 PM6/27/17
to bob-devel
Any ideas? 

Pavel Korshunov

unread,
Jun 27, 2017, 2:21:35 PM6/27/17
to bob-...@googlegroups.com
Hi,

There is another parameter `keep_only_deltas` and by default it is set to True (see bob.bio.spear.extractor.cepstral_extended). It means, by default, it will keep deltas and delta-deltas only and ignore the actual static MFCC features. So once with_delta and with_delta_delta are set to False, the feature vector becomes empty.

You have used a config file mfcc20.py as the base for your customized mfcc-12.py. This config file is somewhat specific to the paper on PAD titled "A Comparison of Features for Synthetic Speech Detection." According to that paper, static MFCC features are ignored by default. This config also uses a CepstralExtended computation class (see bob.bio.spear.extractor.cepstral_extended for full list of parameters), which is more flexible with more parameters than an original Cepstral class (see bob.bio.spear.extractor.Cepstral).

There is a missing documentation on this issue, so it's a little confusing.
If you just want to have a simple MFCC extraction with a minimal set of parameters set, you can use bob.bio.spear.extractor.Cepstral class, then set n_ceps=12, with_delta=False, and with_delta_deltas=False.

We are planning to add more detailed documentation on these issue, but just didn't manage to get to it as of yet.

I hope it helps,
Pavel

--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/
---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Dr. Pavel Korshunov
Biometric group
Idiap Research Institute
Rue Marconi 19
CH - 1920 Martigny
Switzerland

Room: 207

Neve Stagy

unread,
Jul 5, 2017, 7:18:44 PM7/5/17
to bob-devel
Thank you so much, this helps tremendously!

--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/

---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages