I want to implement a keyword spotting based on PocketSphinx for an Android app.
PocketSphinx is new for me. I started with the PocketsphinxAndroidDemo from their repo. Then I have imported the project in Eclipse and have build and deployed the demo app on my phone. The demo recognized the commands deposit and withdraw and numbers fine. I have not installed any other lib or tool.
Now I want to recognize my own keywords and follew the CMUSphinx tutorial. Therefore I created an own DIC and LM file using "Sphinx knowledge base generator" and have included in the assets subfolder of the project. The corpus I use:
open browser
new e-mail
forward
backward
next window
last window
open music player
I have modified SpeechRecognizer the following:
config.setString("-jsgf", joinPath(dataDir, "dialog.gram")); // unmodified
config.setString("-dict", joinPath(dataDir, "lm/2914.dic"));
config.setString("-lm", joinPath(dataDir, "lm/2914.lm"));
config.setString("-hmm", joinPath(dataDir, "hmm/hub4wsj_sc_8k")); // unmodified
Then I have started the app again and got the following errors:
11-21 12:48:18.758: E/cmusphinx(15521): "fsg_search.c", line 334: The word 'withdraw' is missing in the dictionary
and
11-21 12:48:26.375: A/libc(15521): Fatal signal 11 (SIGSEGV) at 0x0000001c (code=1), thread 15557 (SpeechRecognize)
I know "withdraw" is a word of the former dictionary.
What do I have to modify in the grammar file?
I also read this tutorial http://www.aiaioo.com/cms/index.php?id=28 and used the acoustic model and the phonetic dictionary from there. I have modified the SpeechRecognizer again. While the app is starting, I see the ressources were loaded correctly. But then I got the same error.
Can someone please tell me please what the problem is? What steps do I have to do to get my spotting running?
Try to change entries in a dictionary file to ALL CAPS. Try using this for your dictionary file:
OPEN BROWSER
NEW E-MAIL
FORWARD
BACKWARD
NEXT WINDOW
LAST WINDOW
OPEN MUSIC PLAYER
This worked for me.
User contributions licensed under CC BY-SA 3.0