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
    Posts
  • #1015496
    Geri
    Participant

    Hi.
    I have a pocketSphinx set up, started listening with…

    [self.pocketsphinxController startListeningWithLanguageModelAtPath:self.languageModel.languageModelPath
    dictionaryAtPath:self.languageModel.dictionaryPath
    languageModelIsJSGF:NO];

    …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
    withDictionary:self.languageModel.dictionaryPath];

    …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?

    #1015497
    Geri
    Participant

    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.

    #1015498
    Halle Winkler
    Politepix

    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.

    #1015502
    Geri
    Participant

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

    #1015511
    giebler
    Participant

    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.

    #1015512
    Halle Winkler
    Politepix

    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.

    #1015516
    Geri
    Participant

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

    #1015517
    Halle Winkler
    Politepix

    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.