Menu

ERROR: syntax error

Help
clbin
2011-06-16
2012-09-22
  • clbin

    clbin - 2011-06-16

    Hello, I encountered an error.About jsgf.

    INFO: cmd_ln.c(691): Parsing command line:
    pocketsphinx_continuous \
        -hmm ../../model/hmm/en/tidigits \
        -dict ../../model/lm/en/tidigits.dic \
        -jsgf ../../model/lm/en/4751.jsgf
    
    Current configuration:
    [NAME]      [DEFLT]     [VALUE]
    -adcdev             
    -agc        none        none
    -agcthresh  2.0     2.000000e+00
    -alpha      0.97        9.700000e-01
    -argfile            
    -ascale     20.0        2.000000e+01
    -backtrace  no      no
    -beam       1e-48       1.000000e-48
    -bestpath   yes     yes
    -bestpathlw 9.5     9.500000e+00
    -cep2spec   no      no
    -ceplen     13      13
    -cmn        current     current
    -cmninit    8.0     8.0
    -compallsen no      no
    -dict               ../../model/lm/en/tidigits.dic
    -dictcase   no      no
    -dither     no      no
    -doublebw   no      no
    -ds     1       1
    -fdict              
    -feat       1s_c_d_dd   1s_c_d_dd
    -featparams         
    -fillprob   1e-8        1.000000e-08
    -frate      100     100
    -fsg                
    -fsgusealtpron  yes     yes
    -fsgusefiller   yes     yes
    -fwdflat    yes     yes
    -fwdflatbeam    1e-64       1.000000e-64
    -fwdflatefwid   4       4
    -fwdflatlw  8.5     8.500000e+00
    -fwdflatsfwin   25      25
    -fwdflatwbeam   7e-29       7.000000e-29
    -fwdtree    yes     yes
    -hmm                ../../model/hmm/en/tidigits
    -input_endian   little      little
    -jsgf               ../../model/lm/en/4751.jsgf
    -kdmaxbbi   -1      -1
    -kdmaxdepth 0       0
    -kdtree             
    -latsize    5000        5000
    -lda                
    -ldadim     0       0
    -lifter     0       0
    -lm             
    -lmctl              
    -lmname     default     default
    -logbase    1.0001      1.000100e+00
    -logfn              
    -logspec    no      no
    -lowerf     133.33334   1.333333e+02
    -lpbeam     1e-40       1.000000e-40
    -lponlybeam 7e-29       7.000000e-29
    -lw     6.5     6.500000e+00
    -maxhistpf  100     100
    -maxhmmpf   -1      -1
    -maxnewoov  20      20
    -maxwpf     -1      -1
    -mdef               
    -mean               
    -mfclogdir          
    -mixw               
    -mixwfloor  0.0000001   1.000000e-07
    -mmap       yes     yes
    -ncep       13      13
    -nfft       512     512
    -nfilt      40      40
    -nwpen      1.0     1.000000e+00
    -pbeam      1e-48       1.000000e-48
    -pip        1.0     1.000000e+00
    -rawlogdir          
    -remove_dc  no      no
    -round_filters  yes     yes
    -samprate   16000       1.600000e+04
    -sdmap              
    -seed       -1      -1
    -sendump            
    -silprob    0.005       5.000000e-03
    -smoothspec no      no
    -spec2cep   no      no
    -svspec             
    -tmat               
    -tmatfloor  0.0001      1.000000e-04
    -topn       4       4
    -toprule            
    -transform  legacy      legacy
    -unit_area  yes     yes
    -upperf     6855.4976   6.855498e+03
    -usewdphones    no      no
    -uw     1.0     1.000000e+00
    -var                
    -varfloor   0.0001      1.000000e-04
    -varnorm    no      no
    -verbose    no      no
    -warp_params            
    -warp_type  inverse_linear  inverse_linear
    -wbeam      7e-29       7.000000e-29
    -wip        0.65        6.500000e-01
    -wlen       0.025625    2.562500e-02
    
    INFO: cmd_ln.c(691): Parsing command line:
    \
        -dither yes \
        -lowerf 1 \
        -upperf 4000 \
        -nfilt 20 \
        -transform dct \
        -round_filters no \
        -remove_dc yes \
        -wlen 0.025 \
        -feat s2_4x \
        -agc none \
        -cmn current \
        -cmninit 63,-1,1 \
        -varnorm no
    
    Current configuration:
    [NAME]      [DEFLT]     [VALUE]
    -agc        none        none
    -agcthresh  2.0     2.000000e+00
    -alpha      0.97        9.700000e-01
    -cep2spec   no      no
    -ceplen     13      13
    -cmn        current     current
    -cmninit    8.0     63,-1,1
    -dither     no      yes
    -doublebw   no      no
    -feat       1s_c_d_dd   s2_4x
    -frate      100     100
    -input_endian   little      little
    -lda                
    -ldadim     0       0
    -lifter     0       0
    -logfn              
    -logspec    no      no
    -lowerf     133.33334   1.000000e+00
    -mfclogdir          
    -ncep       13      13
    -nfft       512     512
    -nfilt      40      20
    -rawlogdir          
    -remove_dc  no      yes
    -round_filters  yes     no
    -samprate   16000       1.600000e+04
    -seed       -1      -1
    -smoothspec no      no
    -spec2cep   no      no
    -svspec             
    -transform  legacy      dct
    -unit_area  yes     yes
    -upperf     6855.4976   4.000000e+03
    -varnorm    no      no
    -verbose    no      no
    -warp_params            
    -warp_type  inverse_linear  inverse_linear
    -wlen       0.025625    2.500000e-02
    
    INFO: acmod.c(82): Parsed model-specific feature parameters from ../../model/hmm/en/tidigits/feat.params
    INFO: mdef.c(520): Reading model definition: ../../model/hmm/en/tidigits/mdef
    INFO: mdef.c(531): Found byte-order mark BMDF, assuming this is a binary mdef file
    INFO: bin_mdef.c(301): Reading binary model definition: ../../model/hmm/en/tidigits/mdef
    INFO: bin_mdef.c(480): 34 CI-phone, 396 CD-phone, 5 emitstate/phone, 170 CI-sen, 670 Sen, 222 Sen-Seq
    INFO: tmat.c(204): Reading HMM transition probability matrices: ../../model/hmm/en/tidigits/transition_matrices
    INFO: acmod.c(114): Attempting to use SCGMM computation module
    INFO: s2_semi_mgau.c(981): Reading S3 mixture gaussian file '../../model/hmm/en/tidigits/means'
    INFO: s2_semi_mgau.c(1080): 1 mixture Gaussians, 256 components, 4 feature streams, veclen 51
    INFO: s2_semi_mgau.c(981): Reading S3 mixture gaussian file '../../model/hmm/en/tidigits/variances'
    INFO: s2_semi_mgau.c(1080): 1 mixture Gaussians, 256 components, 4 feature streams, veclen 51
    INFO: s2_semi_mgau.c(748): Loading senones from dump file ../../model/hmm/en/tidigits/sendump
    INFO: s2_semi_mgau.c(764): BEGIN FILE FORMAT DESCRIPTION
    INFO: s2_semi_mgau.c(793): Rows: 1310301184, Columns: 1647416696
    ERROR: "s2_semi_mgau.c", line 796: Dump file is incompatible with PocketSphinx
    INFO: fe_interface.c(289): You are using the internal mechanism to generate the seed.
    INFO: feat.c(684): Initializing feature stream to type: 's2_4x', ceplen=13, CMN='current', VARNORM='no', AGC='none'
    INFO: cmn.c(142): mean[0]= 12.00, mean[1..12]= 0.0
    INFO: dict.c(232): Allocating 20 placeholders for new OOVs
    INFO: dict.c(494):     11 = words in file [../../model/lm/en/tidigits.dic]
    INFO: dict.c(349): LEFT CONTEXT TABLES
    INFO: dict.c(1013): Entry Context table contains
            12 entries
    INFO: dict.c(1014):        408 possible cross word triphones.
    INFO: dict.c(1052):        132 triphones
           242 pseudo diphones
            34 uniphones
    INFO: dict.c(1099): Exit Context table contains
            12 entries
    INFO: dict.c(1100):        408 possible cross word triphones.
    INFO: dict.c(1166):        132 triphones
           242 pseudo diphones
            34 uniphones
    INFO: dict.c(1168):         79 right context entries
    INFO: dict.c(1169):          6 ave entries per exit context
    INFO: dict.c(355): RIGHT CONTEXT TABLES
    INFO: dict.c(1013): Entry Context table contains
            12 entries
    INFO: dict.c(1014):        408 possible cross word triphones.
    INFO: dict.c(1052):        132 triphones
           242 pseudo diphones
            34 uniphones
    INFO: dict.c(1099): Exit Context table contains
            12 entries
    INFO: dict.c(1100):        408 possible cross word triphones.
    INFO: dict.c(1166):        132 triphones
           242 pseudo diphones
            34 uniphones
    INFO: dict.c(1168):         76 right context entries
    INFO: dict.c(1169):          6 ave entries per exit context
    INFO: fsg_search.c(134): FSG(beam: -1105112, pbeam: -1105112, wbeam: -648215; wip: -27995, pip: 0)
    ERROR: syntax error
    JSGF parse of ../../model/lm/en/4751.jsgf failed
    

    my jsgf:

    #JSGF V1.0;
    grammar commands;
    public <command> =(0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9);
    

    Another problem is: -jsgf can be used in android?

    Thanks

     
  • clbin

    clbin - 2011-06-16

    What tools can be used to generate jsgf?

     
  • clbin

    clbin - 2011-06-16

    sorry ,He did not succeed!
    My question is:

    INFO: fsg_search.c(134): FSG(beam: -1105112, pbeam: -1105112, wbeam:
    -648215; wip: -27995, pip: 0)
    ERROR: syntax error
    JSGF parse of ../../model/lm/en/4751.jsgf failed

     
  • Pranav Jawale

    Pranav Jawale - 2011-06-16

    Please paste your modified jsgf file

     
  • clbin

    clbin - 2011-06-16

    HI.
    4751.jsgf :

    #JSGF V1.0;
    grammar command;
    public <command> = <digit>* ;
    <digit> = ONE 
            | TWO
            | THREE 
            | FOUR  
            | FIVE 
            | SIX   
            | SEVEN 
            | EIGHT 
            | NINE
            | OH
    ;
    

    dic :

    EIGHT                EY_eight T_eight
    FIVE                 F_five AY_five V_five
    FOUR                 F_four OW_four R_four
    NINE                 N_nine AY_nine N_nine_2
    OH                   OW_oh
    ONE                  W_one AX_one N_one
    SEVEN                S_seven EH_seven V_seven E_seven N_seven
    SIX                  S_six I_six K_six S_six_2
    THREE                TH_three R_three II_three
    TWO                  T_two OO_two
    ZERO                 Z_zero II_zero R_zero OW_zero
    

    Thanks in advance!

     
  • Nickolay V. Shmyrev

    You can try to build sphinxbase snapshot from today. It has better error
    reporting, should show you the exact location where you made a syntax error in
    the grammar.

     
  • clbin

    clbin - 2011-06-21

    hello
    I use the latest sphinxbase. And then executed. Tips are as follows:

    INFO: fsg_search.c(134): FSG(beam: -1105112, pbeam: -1105112, wbeam: -648215; wip: -27995, pip: 0)
    grammar'jsgf_parser.y", line 155: syntax error, unexpected TOKEN, expecting GRAMMAR at line 1 current token '
    ERROR: "jsgf.c", line 722: Failed to parse JSGF grammar from '../../../../cmuclmtk/1306/etc/1306.jsgf'
    

    I did not see the exception in the first line.
    thanks

     
  • Nickolay V. Shmyrev

    Share the grammar file. You can upload it to a public file sharing resource
    and provide a link here.

     
  • clbin

    clbin - 2011-06-23

    Hello , my 1306.jsgf :

    #JSGF V1.0;
    grammar audios;
    public <audio> =( 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | BACK | NEXT | PREVIOUS )*;
    

    I did not find anything unusual.
    Thanks.

     
  • clbin

    clbin - 2011-06-23

    [url]http://sharesend.com/7nglk[/url]

     
  • Nickolay V. Shmyrev

    Well, your grammar has CR symbols but no newlines. It's not a very common
    thing around

    Anyway, if you update to sphinxbase trunk it will parse this grammar properly.

     
  • clbin

    clbin - 2011-06-24

    Hello.

    Segmentation fault (core dumped)
    

    There are still problems.
    Thanks

     
  • Nickolay V. Shmyrev

    Provide more information. Provide log and stacktrace.

     
  • clbin

    clbin - 2011-06-26

    hello
    How should I get log and stacktrace.

     
  • clbin

    clbin - 2011-06-27

    OK, This problem has been solved。
    Thanks

     

Log in to post a comment.