Not detecting alphanumeric input well - CMU Sphinx Java

淺唱寂寞╮ 提交于 2019-12-25 02:34:27

问题


I'm trying Sphinx to recognize alphanumeric input with the dialog (DialogDemo) as a start. I have a .gram file with:

#JSGF V1.0;

grammar dialog;

<digit> = oh    |
          zero  |
          one   |
          two   |
          three |
          four  |
          five  |
          six   |
          seven |
          eight |
          nine  |
          a     |
          b     |
          c     |
          d     |
          e     |
          f     |
          g     |
          h     |
          i     |
          j     |
          k     |
          j     |
          l     |
          m     |
          n     |
          o     |
          p     |
          q     |
          r     |
          s     |
          t     |
          u     |
          v     |
          w     |
          x     |
          y     |
          z     ;

<number> = <digit>+ [point <digit>+];

<menu_command> =  digits                     |
                  [go to [the]] bank account |
                  weather forecast           |
                  exit [[the] program]       ;

<bank_command> = [show | check] balance |
                 deposit <number>       |
                 withdraw <number>      |
                 back                   ;

public <command> = <menu_command> | <bank_command>;

and a .dict file with a very limited dictionary:

a EY
a AH
b B IY
c S IY
d D IY
e IY
f EH F
g JH IY
h K
i AY
j JH EY
k K EY
l EH L
m EH M
o OW
p P IY
q K Y UW
r AA R
s AH S
s S
t T IY
u Y UW
v IY
w D AH B AH L Y UW
x EH K S
y W AY
z Z IY
zero Z IH R OW
one W AH N
two T UW
three TH R IY
four F AO R
five F AY V
five F AY V Z
six S IH K S
seven S EH V AH N
eight EY T
nine N AY N

Now this should be recognizing just these characters but when I speak for example "ABC" it reads it as

a f

k e e b u s

When I speak "1...2...3..." It reads it as:

a h a

a o a r h a

Is there some conflict with having a lot of short phenomes and is there a way to get it to train for only these letters/numbers in a better way?

来源:https://stackoverflow.com/questions/58178110/not-detecting-alphanumeric-input-well-cmu-sphinx-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!