[Resolved] Do I need a paid plugin?

Home Forums OpenEars [Resolved] Do I need a paid plugin?

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

  • Author
    Posts
  • #1023123
    jugg1es
    Participant

    I have OpenEars running well, but I can’t get it to do exactly what I need and I’m not sure if it’s because I need a paid plugin.

    My requirements:

    1) Dynamically generate (relatively) small grammar sets (or language models as they’re called here I guess)
    2) After a recognition event, the previous grammar is obsolete and I need to be able to quickly trash the current models and insert new ones
    3) I don’t need recognition events as the words are spoken
    4) I’d rather not have to write each grammar set to the disk each time

    Basically, I’m having trouble when I try to load new language models and it seems to take longer than necessary to load models in the first place. Since I have to create possibly dozens of models during the course of the app, I don’t want the models to write to disk. Do I need a paid plugin to do this? or can I use OpenEars alone?

    #1023125
    Halle Winkler
    Politepix

    Welcome,

    1) Dynamically generate (relatively) small grammar sets (or language models as they’re called here I guess)

    Language models (which are statistical models) and grammars (which are rulesets) are actually two different things, but both are supported by OpenEars. You can read more about both in the documentation for PocketsphinxController and LanguageModelGenerator if you’re interested. Choosing between them is generally one of the most important UX design decisions for a speech UI.

    2) After a recognition event, the previous grammar is obsolete and I need to be able to quickly trash the current models and insert new ones

    OK, this is the standard use case that the language model and grammar generation API was designed for.

    Basically, I’m having trouble when I try to load new language models and it seems to take longer than necessary to load models in the first place.

    This doesn’t really take an easily-perceptible amount of time, so if you are ever finding yourself waiting for a language model or grammar to be generated, that is a suggestion that there is some other issue. What is your indication that it is language model generation that is causing a delay versus something else?

    It doesn’t sound like you need a plugin necessarily since your use case is the standard one. The only thing that sounds unusual is being concerned with the models or grammar writing out (what is the concern there?), and the issue with the delay or perception of delay due to some other cause. We can troubleshoot the delay and see what it is that is causing that symptom.

    #1023126
    jugg1es
    Participant

    Thanks for your quick reply.

    I think that the Language Model will best suit my needs. The reason I’m concerned about it writing to disk is that I need to be able to load the models quickly (read: almost instantly) and since the app might need to generate a new model 40 times during one session, we’re talking about hundreds of files written to disk.

    Is there a way to overwrite the current language model file each time? When I try to do this, I get errors that say either ‘failed to delete’ or ‘failed to access’ one or all of the model files.

    #1023127
    jugg1es
    Participant

    Also, when I say there’s a delay when loading the model, I’m talking about the time it takes from when you load the model and start listening. It takes a second or two during the ‘calibration’ phase to actually start listening. So it’s not that the model takes a long time to load, but theres a significant time between loading the model and ‘Listening’ event.

    #1023128
    jugg1es
    Participant

    Please disregard my previous posts :) I got it working like I want it to.

    The reason I was having trouble was due to a separate bug in my app. Thanks a lot for your help and supporting this great free tool!

    #1023129
    Halle Winkler
    Politepix

    Is there a way to overwrite the current language model file each time?

    No, this wouldn’t work since the previous model is actually in use (see below). What you can do is simply delete a model once you are sure you’re done with it (i.e. not after you’ve switched to a new model, but after you’ve switched to the new model after the new model).

    It takes a second or two during the ‘calibration’ phase to actually start listening

    OK, this is the underlying issue. PocketsphinxController can instantly switch between models on the fly, it does not require starting and stopping. Check out the PocketsphinxController method

    changeLanguageModelToFile:

    – there is a full example of its use in the sample app.

    #1023130
    Halle Winkler
    Politepix

    The reason I was having trouble was due to a separate bug in my app.

    Glad to hear it – I still strongly suggest instant-switching between language models on the fly with changeLanguageModelToFile: instead of starting and stopping the session for every new model. Good luck with your project!

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