I am trying to use pocketsphinx in my Java project (on Windows), I managed to use swig to create wrapper .c files, however I am struggling building proper .dll needed to run DecoderTest.java. The error I am getting is :
java.lang.UnsatisfiedLinkError: PocketSphinxJNI.Decoder_defaultConfig()J
Before writing this post I really searched for the answer on this forum as well as I read the documentation etc. I even created a separate project placing all of the pocketsphinx and sphinxbase source files + wrap.c files (as it was suggested in one of the replies) and it was no good.
I am lost, please can anyone help me?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The file pocketsphinx_wrap.c is almost empty in your src folder. You need to check swig invocation for pocketsphinx part to why is it empty. sphinxbase_wrap.c file is ok.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That was exactly it! I wondered if the file was supposed to be this way, apparently not. It is possible that when usig swig I just invoked the sphinxbase.i, which created both wrap.c files and I thought pocketsphinx.i was done automatically. As I mentioned, I have never encountered swig before. Now I can finally proceed furhter, many thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am trying to use pocketsphinx in my Java project (on Windows), I managed to use swig to create wrapper .c files, however I am struggling building proper .dll needed to run DecoderTest.java. The error I am getting is :
java.lang.UnsatisfiedLinkError: PocketSphinxJNI.Decoder_defaultConfig()J
Before writing this post I really searched for the answer on this forum as well as I read the documentation etc. I even created a separate project placing all of the pocketsphinx and sphinxbase source files + wrap.c files (as it was suggested in one of the replies) and it was no good.
I am lost, please can anyone help me?
Share all your files, I'll check.
Thanks for the quick reply!
PocketsphinxTest contains Java project files (with generated jni files) and src is the code I took from pocketsphinx and sphinxbase to generate dll.
I am probably missing something here, I just have no other ideas what to do now.
The file pocketsphinx_wrap.c is almost empty in your src folder. You need to check swig invocation for pocketsphinx part to why is it empty. sphinxbase_wrap.c file is ok.
That was exactly it! I wondered if the file was supposed to be this way, apparently not. It is possible that when usig swig I just invoked the sphinxbase.i, which created both wrap.c files and I thought pocketsphinx.i was done automatically. As I mentioned, I have never encountered swig before. Now I can finally proceed furhter, many thanks!