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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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.