0

I'm using the following code to setup recognizer (should give you an idea of the sequence of init actions and model used):

File modelsDir = new File(assetsDir, "models");
recognizer = defaultSetup()
        .setAcousticModel(new File(modelsDir, "hmm/lium_french_f2"))
        .setDictionary(new File(modelsDir, "dict/frenchWords62K.dic"))
        .setRawLogDir(assetsDir).setKeywordThreshold(1e-20f)
        .getRecognizer();
recognizer.addListener(this);

// Create keyword-activation search.
recognizer.addKeyphraseSearch(KWS_SEARCH, WAKEPHRASE);

I'm getting the following error - any idea why? Same code works perfect with English model.

java.lang.RuntimeException: Decoder_setSearch returned -1
        at edu.cmu.pocketsphinx.PocketSphinxJNI.Decoder_setSearch(Native Method)
        at edu.cmu.pocketsphinx.Decoder.setSearch(Unknown Source)
        at edu.cmu.pocketsphinx.SpeechRecognizer.startListening(Unknown Source)
NeviQ-OR
  • 305
  • 2
  • 12
  • You need to provide logcat output, you can find additional details in the logcat. For default configuration (16khz) you need to use 16khz model lium_french_f0, not lium_french_f2 for 8khz. – Nikolay Shmyrev Nov 12 '14 at 17:11
  • I was looking into both f0 and f2's readme's and it appears they are both 16khz. Anyways I had much better luck are recognizing french with f0. – NeviQ-OR Nov 12 '14 at 22:46

0 Answers0