PocketSphinx stops listening after I change language file.

Home Forums OpenEars PocketSphinx stops listening after I change language file.

Viewing 8 posts - 1 through 8 (of 8 total)

  • Author
  • #1015496

    I have a pocketSphinx set up, started listening with…

    [self.pocketsphinxController startListeningWithLanguageModelAtPath:self.languageModel.languageModelPath

    …without any problem,
    Then I suspend listening with…

    [self.pocketsphinxController suspendRecognition];

    Then I change the model file (it works well, as the OpenEarsEventsObserverDelegate callback method gets called) with…

    [self.pocketsphinxController changeLanguageModelToFile:self.languageModel.languageModelPath

    …and after that at a certain point I resume listening with…

    [self.pocketsphinxController resumeRecognition];

    …but no any recognition takes place anymore.

    What am I doing wrong? Should this be working in a way like this?


    Could it be the problem that I use a common same name for language model files?

    Namely “Bound vocabulary” every time I generate a language model.

    Halle Winkler

    The first step is turning on verbosePocketsphinx so you can see any recognition errors or warnings in the console. Is it an ARPA model or a JSGF grammar? You do need to give your models unique names.


    Thanks, unique naming seems solved this issue.
    Still really love this support, like you were sitting here around.


    This same thing happened to me when I updated to version 1.2.5. I have an app where I need to add words occasionally. When I generate the new files, it would go through the motions of listening, but not ever recognize anything. Based on Geri’s solution, I deleted the old dynamic dictionary and grammar files before creating the new ones and this eliminated the bug. Now I can use the same file names over and over. Hope this helps you track down the bug.

    Halle Winkler

    Hi Giebler,

    It’s a requirement that language models have unique names, not really a bug, but I’ll mention it in the docs for clarity.


    Actually, why do we need add names for the model files at all?
    Some kind of reusability considerations?

    Halle Winkler

    Which name are you referring to? The file name that you pass to LanguageModelGenerator when you are requesting the generated model or something else?

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.