2
$\begingroup$

The general recommendation for window size when calculating MFCC seems to be 20-40 msec. This is most often recommended in a context of 16000 samples per second, so leading to a window containing 320-640 samples.

What if my input is at 8000 samples per second, should the time frame of the window be targeted at 20-40 msec or should the amount of samples be targeted at 320-640?

I understand the window needs to have a minimal duration in order to include lower frequencies and that the maximum duration is limited to have stable sounds (phones). What would be the reason to still prefer 40 msec over 20 msec?

What determines the minimal amount of samples? A 20msec window at 8000 samples per second is 160 samples, is that sufficient?

Context is speech recognition

$\endgroup$

2 Answers 2

1
$\begingroup$

I will answer your question from my experience. For most of the time, I've been using window length which is a power of 2, trying a few overlap percentages, training the system and picking the one which performs the best.

In the case of 16000 Hz, I would try 256 samples (16 ms) and 512 samples (32 ms). For 8000 Hz, my bet would be on 256 (32 ms). Don't forget to try a few overlap values, however, it shouldn't change much.

At the end of the day, what matters is the number of MFCC filter banks and the resultant amount of coefficients.

$\endgroup$
0
$\begingroup$

Smaller durations are better because they increase the time resolution.

What would be the reason to still prefer 40 msec over 20 msec?

Larger samples are better because they increase the frequency resolution.

However, add more samples for fixed duration requires increasing the sample rate, which requires padding more zeros (increasing fft order) to keep the frequency bin width the same. This comes at increased computational cost, and you are paying to compute the DFT for frequency ranges you don't need +4000 Hz.

I'm going to do

  • 16000 samples per second
  • 40 ms duration
  • 512 fft order

Since that's what everyone else does.

If you're doing 8000 samples per second, the benefit would be to save on computations and only compute a 256 point fft, but you would be paying the cost in terms of frequency resolution

Also be careful not to confuse the window duration/number of samples with the stride/increment of the stft because 20-40ms is common for that too.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.