我正在尝试改变Sphinx4 java
的演示使用的语法是
public <numbers> = (Able |ABY | Angamaly | Six ) * ;
我添加了行
ABRAHAM EY B R AH HH AE M
ABY AH B AY
ANGAMALY AE N G AE M AH L IY
到
TIDIGITS_8gau_13dCep_16k_40mel_130Hz_6800Hz \ EDU \ CMU \斯芬克斯\模型\声\ TIDIGITS_8gau_13dCep_16k_40mel_130Hz_6800Hz \字典
但是我收到了错误
12:18.170 WARNING dictionary Missing word: able
in edu.cmu.sphinx.linguist.dictionary.FastDictionary:getWord-dictionary
12:18.180 SEVERE tidigits Can't find HMM for AH
in edu.cmu.sphinx.model.acoustic.TIDIGITS_8gau_13dCep_16k_40mel_130Hz_6800Hz.Model:lookupNearestHMM-tidigits
Exception in thread "main" java.lang.NullPointerException
at edu.cmu.sphinx.linguist.flat.FlatLinguist$GState.getHMMStates(FlatLinguist.java:1196)
at edu.cmu.sphinx.linguist.flat.FlatLinguist$GState.expandUnit(FlatLinguist.java:1171)
at edu.cmu.sphinx.linguist.flat.FlatLinguist$GState.attachUnit(FlatLinguist.java:983)
at edu.cmu.sphinx.linguist.flat.FlatLinguist$GState.expandPronunciation(FlatLinguist.java:917)
at edu.cmu.sphinx.linguist.flat.FlatLinguist$GState.expandWord(FlatLinguist.java:840)
at edu.cmu.sphinx.linguist.flat.FlatLinguist$GState.expand(FlatLinguist.java:748)
at edu.cmu.sphinx.linguist.flat.FlatLinguist.compileGrammar(FlatLinguist.java:319)
at edu.cmu.sphinx.linguist.flat.FlatLinguist.allocate(FlatLinguist.java:232)
at edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager.allocate(SimpleBreadthFirstSearchManager.java:576)
at edu.cmu.sphinx.decoder.Decoder.allocate(Decoder.java:109)
at edu.cmu.sphinx.recognizer.Recognizer.allocate(Recognizer.java:182)
at demo.sphinx.hellodigits.HelloDigits.main(HelloDigits.java:52)
路径设置正确 如果我们不在TIDIGITS_8gau_13dCep_16k_40mel_130Hz_6800Hz中编辑字典文件,该程序运行良好
默认字典文件如下所示
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