Cmusphinx Pocketsphinx - Recognize All (Or Large Amount) of Words

Is it possible in sphinx 4 to recognize all possible words

No, it's not possible. Every speech recognizer including the one from Google uses limited vocabulary. Google uses large one of about 1.5 million words but still limited. So CMUSphinx. You can verify that by trying to recognize rare proper names, it's almost impossible even with Google.

The practical solution is to use large language model with large vocabulary.

It's a open research question to detect new words in an audio stream and add them recognizer with spoken or other type of feedback.

Pocketsphinx - Adding words and Improving accuracy

With something like this, you can't be certain, but I can offer the following suggestions:

  1. Perhaps the language model somehow has low probabilities for "spaghetti" and "pencil". As you suggested, you could use a JSGF to test out how it does for recognition if it doesn't use the N-gram models, but instead does a simple grammar (give it like twenty words, including spaghetti and pencil). This way you can see if it is perhaps the language model which makes it difficult to recognize these words, and it can do okay if it considers all the words to have equal probability.

  2. Perhaps you simply pronounce these words poorly, even with the alternative dictionary entries. Try either A. Testing other peoples' voices, or B. Adapting the acoustic model to your voice (see http://cmusphinx.sourceforge.net/wiki/tutorialam)

  3. Also, what is it recognizing them as when it is failing? If possible, remove the words it misrecognizes as from the dictionary.

Again, for overall accuracy, only three things are going to really help you: restricting the grammar, adapting the accoustic model, and perhaps getting higher quality recording input.

CMU PocketSphinx Recognize a dynamically entered word

You can add and delete keyword search any time, something like this:

private static final String SEARCH_NAME = "kws";

/* Word you want to check */
public void recognizeWord(String word ) {
recognizer.setKeyphrase(SEARCH_NAME, word);
recognizer.setSearch(SEARCH_NAME);
recognizer.startListening(SEARCH_NAME);
}

How to see if word exists in Pocketsphinx dictionary?

In C there is ps_lookup_word function which allows you to lookup for the word:

if (ps_lookup_word(ps, "abc") == NULL) {
// do something
}

In Java wrapper it's a method Decoder.lookupWord:

if(decoder.lookupWord("abc") == null) {
// do something
}

In Android, you can access decoder from Recognizer:

if(recognizer.getDecoder().lookupWord("abc") == null) {
// do something
}


Related Topics



Leave a reply



Submit