Menu

Pocketsphinx is ignoring the rules of grammar

Help
2017-01-16
2017-01-16
  • pablo fernandez

    pablo fernandez - 2017-01-16

    I have a grammar like this:

    #JSGF V1.0;
    grammar test;
    <saludo> = (klatu | lumos | niquel);
    <action> = (berata | ancalima);
    <cosa> = (nikto | acuario);
    public <command> = <saludo> <action> <cosa>;
    

    The language model is like this

    \data\
    ngram 1=10
    ngram 2=5
    ngram 3=5
    
    \1-grams:
    1       <UNK>       
    0.5     </s>
    0.5     <s>     
    0.1     acuario     
    0.1     berata      
    0.1     klatu       
    0.1     nikto   
    0.1     niquel
    0.1     lumos       
    0.1     ancalima        
    
    \2-grams:
    1       <s> <UNK>
    1       <UNK> <UNK>
    0.1     <s> klatu   
    0.1     klatu berata    
    0.1     lumos ancalima  
    
    \3-grams:
    0.1     <s> <s> <UNK> 
    0.1     <s> <UNK> <UNK> 
    0.1     <UNK> <UNK> <UNK> 
    0.1     <s> klatu berata 
    0.1     klatu berata nikto
    
    \end\
    

    And the command that launches PocketSphinx is:

    pocketsphinx_continuous -dict es2.dict -lm es-20k3.lm -hmm model_parameters/voxforge_es_sphinx.cd_ptm_4000 -inmic yes -jsgf grammar.jsgf

    Still, If I say "Berata Klatu Nikto", PocketSphinx transcribes "Berata Klatu Nikto", which I think that should be impossible by the grammar rules (only Klatu Berata Nikto is allowed).

     
  • pablo fernandez

    pablo fernandez - 2017-01-16

    I see. Thanks

     

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.