Menu

Switch LM on-the-fly Pocketsphinx Android

Help
2011-06-05
2012-09-22
  • Andre Natal

    Andre Natal - 2011-06-05

    Hi all.
    I´m trying tho switch the LM while the app is running, always get a crash.
    I tried to call delete() on both Decoder and Config, tried to null them, then
    recreate the Config and Decoder, but works only on first switch. When I switch
    again, it crashes on

    public Decoder(Config c) {
    this(pocketsphinxJNI.new_Decoder__SWIG_1(Config.getCPtr(c), c), true);
    }

    Anybody knows how can I switch them?

    Thanks

    Andre

     
  • Nickolay V. Shmyrev

    If you need to switch the language model, there is no need to delete the
    decoder. You need to use functions ps_get_lmset and ps_update_lmset which you
    need to wrap using swig.

    If you delete the decoder, config structure is deleted automatically in
    current library version, that's the reason of your crash.

     

Log in to post a comment.