Menu

jsgf question

Help
Alex
2013-04-03
2016-06-03
  • Alex

    Alex - 2013-04-03

    Hello,
    I am using pocketsphinx 0.8 and I have a problem with JSFG grammar: pocketphinx returns recognition strings that do not completely match the grammar i specified.

    For example, I have

    public <test> = took (one | two | three | four )* apples</test>

    So, basically I expect user to start with word "took", say few numbers and finish with word "apples"

    However, I get recognition strings without the mandatory ending. For example "took one two four" etc.

    Am i misunderstanding basic JSFG concepts???

    Thanks in advance for your help,

    Alex

     

    Last edit: Alex 2013-04-03
  • Nickolay V. Shmyrev

    To get hypothesis which matches the grammar you need to use

    ps_get_hyp_final

    function

     
  • Alex

    Alex - 2013-04-03

    Sorry for being dense :)
    I modified ps_get_hyp to ps_get_hyp_final but still see same result.
    Here is the exerpt from my code:

    / Finish decoding, obtain and print result /
    ps_end_utt(ps);
    hyp = ps_get_hyp_final(ps, &out_score, &uttid);
    if(hyp!=NULL){
    E_INFO("%s: %s,score2=%ld\n", uttid, hyp,out_score);
    ...
    }

    My grammar:

    JSGF V1.0;

    grammar picking;
    public <picking> = меню|повторить|пропустить|обратно|<number> ок ;
    <number_0> = ноль | один | одну| два | две | три | четыре | пять | шесть | семь | восемь | девять | десять ;
    <number> = <number_0> (<number_0>)*;</number_0></number_0></number></number_0></number></picking>

    And recognized utterance: два два три

     
  • Nickolay V. Shmyrev

    Sorry, it's hard to tell you what is going on without an audio.

    You are welcome to provide the samples you are trying to recognize for analysis.

     
  • G10DRAS

    G10DRAS - 2016-06-03

    is there any equivalent function of ps_get_hyp_final in python ? I am using pocketsphinx-5prealpha .

     
    • Nickolay V. Shmyrev

      No, moreover I removed ps_get_hyp_final from pocketsphinx altogether. Discussion on that is here:

      https://github.com/cmusphinx/pocketsphinx/issues/13

       

Log in to post a comment.