Hello, I am currently developing a game using pocketsphinx and I need words to be spelled in the game.
I am using Unity and I based my solution on Android Demo but I am having problems with the use of grams.
I ran pocketsphinx from my Windows cmd using a dictionary that only contains the letters of the alphabet, and as you can see the result, is not always perfect (sometimes it confuses letters like b and d), but it's very clean. On the other hand, I did the same on android using the same dictionary and the same "en-us" language model using the same "feat.params" and with the same background noise. The only difference is that here I used a gram and it seems to be printing every single noise it hears and matching it to the gram options.
I need my android game to print a clean result as on my Windows cmd and I am guessing that the gram is the one messing with with.
I checked the android tutorial on the CMUSphinx page but even though it says that the use of grammars is optional I always have to give the StartListening method something to search:
recognizer.startListening(searchName);
And if I don't set addKeyphraseSearch, addGrammarSearch, or addNgramSearch it crashes.
Is it possible to have a cleaner result as on my windows cmd and if it is, what are the steps to achieve it?
Thanks for the quick response!
You're right I was confusing acoustic model with language model, it worked. Still, the accuracy is quite low for spelling, I'll try your suggestion and restrict the LM instead of the dictionary
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I am currently developing a game using pocketsphinx and I need words to be spelled in the game.
I am using Unity and I based my solution on Android Demo but I am having problems with the use of grams.
I ran pocketsphinx from my Windows cmd using a dictionary that only contains the letters of the alphabet, and as you can see the result, is not always perfect (sometimes it confuses letters like b and d), but it's very clean. On the other hand, I did the same on android using the same dictionary and the same "en-us" language model using the same "feat.params" and with the same background noise. The only difference is that here I used a gram and it seems to be printing every single noise it hears and matching it to the gram options.
I need my android game to print a clean result as on my Windows cmd and I am guessing that the gram is the one messing with with.
I checked the android tutorial on the CMUSphinx page but even though it says that the use of grammars is optional I always have to give the StartListening method something to search:
recognizer.startListening(searchName);
And if I don't set addKeyphraseSearch, addGrammarSearch, or addNgramSearch it crashes.
Is it possible to have a cleaner result as on my windows cmd and if it is, what are the steps to achieve it?
The recommended way is to restrict the language model vocabulary instead
It is acoustic model, not language model
You can try to use the same language model on Android as you used on Windows.
Thanks for the quick response!
You're right I was confusing acoustic model with language model, it worked. Still, the accuracy is quite low for spelling, I'll try your suggestion and restrict the LM instead of the dictionary