Menu

Sample rate, Frame Rate, FFTSize, WLEN

Help
Pankaj
2010-12-25
2012-09-22
  • Pankaj

    Pankaj - 2010-12-25

    Hi,

    1. Is there any interdependency between the samprate, frate, fftsize and wlen parameters ?
      With the hub4wsj_sc_8k model the default samprate is 16000, frame rate is 100,
      wlen 0.025 and fftsize 512.
      Suppose I change the sample rate to 8000, then do I need to change the frame
      rate, wlen and fftsize also or can I keep the default values.
      When samprate is 8000, and frate is 100 (default) then framesize comes out to
      be 200 samples as compared to 400 for sample rate of 16000. Now should I
      change the fftsize parameter -nfft to 256 or retain the value 512 (default).
      On a limited data set I have not observed much difference in accuracy when
      fftsize is changed to 256 for 8kHz, but memory requirements get reduced.

    2. In pocketsphinx_continuous, in the silence filtering block, samples per frame is calculated by the following code
      / Set samples/frame such that when sps=16000, spf=256 / -- cont_ad_base.c
      (con_ad_init() function)
      r->spf = (r->sps * 256) / CONT_AD_SPS;
      Now when sampling rate is 8000, should I change CONT_AD_SPS also to 8000, to
      maintain spf at 256 or should I keep it unchanged thus making spf as 128.

     
  • Nickolay V. Shmyrev

    1. Is there any interdependency between the samprate, frate, fftsize and
      wlen
      parameters ?

    Yes

    Suppose I change the sample rate to 8000, then do I need to change the frame
    rate, wlen and fftsize also or can I keep the default values.

    No, it's done automatically, you only need to set sample rate.

    When samprate is 8000, and frate is 100 (default) then framesize comes out
    to be 200 samples as compared to 400 for sample rate of 16000. Now should I
    change the fftsize parameter -nfft to 256 or retain the value 512 (default).
    On a limited data set I have not observed much difference in accuracy when
    fftsize
    is changed to 256 for 8kHz, but memory requirements get reduced.

    There is no difference, I don't think there is memory diference either.

    1. In pocketsphinx_continuous, in the silence filtering block, samples per
      frame is calculated by the following code / Set samples/frame such that
      when sps=16000, spf=256
      / -- cont_ad_base.c
      (con_ad_init() function)
      r->spf = (r->sps * 256) / CONT_AD_SPS;
      Now when sampling rate is 8000, should I change CONT_AD_SPS also to 8000, to
      maintain spf at 256 or should I keep it unchanged thus making spf as 128.

    No, spf 128 is the correct value

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.