I have my project of warship game, and I want to use speech-recognition with pocket sphinx library. I want to use a dictionary instead of google API which is quite great because I want some special word like A8 for example in my 10*10 grid. My question is, how can I add the pronunciation of the numbers and write it in the dictionary?
0
votes
1 Answers
0
votes
Look into existing dictionary cmudict-en-us.dict and select the words that you need:
a. EY
b. B IY
c. S IY
d. D IY
e. IY
f. EH F
g. JH IY
h. EY CH
j. JH EY
k. K EY
1 W AH N
2 T UW
Then write a grammar:
<command> = <letter> <number>
<letter> = a. | b. | c. | d. | e. | f. | j. | h. | i. | j.
<number> = one | two | three
Note that single-letter words are very confusable, like B and D, they are very easy to confuse even for a human. Consider using Radio Alphabet instead.