Menu

Timestamp for each word in pocketsphinx

Help
Scorx Ion
2011-09-10
2012-09-22
  • Scorx Ion

    Scorx Ion - 2011-09-10

    Hello,

    I am trying to get the timestamp for each word in a given utterance by use of
    the function:

    void ps_seg_frames(ps_seg_t seg, int out_sf, int *out_ef);

    This is working great except I don't know the context for out_sf (start frame)
    and out_ef (end frame).

    How can I know or calculate how many frames per second pocketsphinx is using
    for recognition?

    Thanks!

     
  • Nickolay V. Shmyrev

    It's configured with frate:

    frame_rate = cmd_ln_int32_r(config, "-frate");
    
     
  • Scorx Ion

    Scorx Ion - 2011-09-11

    For my current config, I am using:
    config = cmd_ln_init(NULL , ps_args(), TRUE,
    "-hmm", hmmPath,
    "-lm", lmPath,
    "-dict", dictPath,
    "-samprate", "8000",
    NULL);
    Is it better to pass this config to cmd_ln_init32_r() or add "-frate" to my
    first cmd_ln_init? Also, to clarify, if I specify -frate 100 am I getting 100
    frames per second?

    Thanks for the quick response!

     
  • Nickolay V. Shmyrev

    Is it better to pass this config to cmd_ln_init32_r() or add "-frate" to my
    first cmd_ln_init?

    cmd_ln_int32_r retrieves the configured value, it doesn't update it. frate is
    configured in cmd_ln_init. 100 is a default value. It means 100 frame per
    second.

     

Log in to post a comment.