0

I use Pocketsphinx for wakeup word detection in my Android app. After initializing pocketsphinx and after start listening via

private void setup() {
    try {
        final Assets assets = new Assets(ListeningActivity.this);
        final File assetDir = assets.syncAssets();
        mRecognizer = SpeechRecognizerSetup.defaultSetup()
                .setAcousticModel(new File(assetDir, "models/en-us-ptm"))
                .setDictionary(new File(assetDir, "models/lm/words.dic"))
                .setKeywordThreshold(Float.valueOf("1.e-" + 2 * sensibility))
                .getRecognizer();
        mRecognizer.addKeyphraseSearch(WAKEWORD_SEARCH, getString(R.string.wake_word));
        mRecognizer.addListener(this);
        mRecognizer.startListening(WAKEWORD_SEARCH);
        Log.d(LOG_TAG, "... listening");
    } catch (IOException e) {
        Log.e(LOG_TAG, e.toString());
    }
}

the recognition quality is very good.

But over time the recognition quality is getting worse. This means my wakeup word detection is so bad then, that I have to say ma wakeup word about 5 times until the speechrecognizer detect it. If I reinitialize the speechrecognizer again the wakeup word detection quality is very good again but is getting worse over time like before.

What can I do to keep the good quality over time without permananet reinitializing the pocketsphinx SpeechRecognizier again?

jochen6677
  • 119
  • 4
  • Set vadThreshold to filter noise properly and watch CMN values to make sure they are stable. – Nikolay Shmyrev Apr 01 '19 at 11:32
  • If vadThreshold is a static value then it must be okay because first time after initilaizing accuracy is great. And what can be the reason that CMN values are changing during runtime? – jochen6677 Apr 01 '19 at 11:49
  • Because VAD threshold is wrong, it considers noise as speech and adjusts cmn estimation accordingly. If you remove background noise or configure vad threshold, it will keep the proper cmn estimation and recognize accurately. If you have something like music playing on background, it will be harder to fix it, you have to filter music by other means. – Nikolay Shmyrev Apr 01 '19 at 12:04
  • There are many discussions on the forum on the topic, you can review them for more details. https://sourceforge.net/p/cmusphinx/discussion/search/?q=cmn+vadthreshold – Nikolay Shmyrev Apr 01 '19 at 12:07

0 Answers0