I'm not sure of how much help I will be. I've never worked with the JNI.
Here's the documentation in case you haven't seen that.
http://voce.sourceforge.net/files/VoceWhitePaper.pdf
Here's a paragraph from that documentation, which is relevant to your problem:
For C++ support, Voce uses the Java
Native Interface [14] to create a C++
API that can access the Java Voce
package internally. A single C++ header
file contains all necessary functions to
interface a C++ application with the Java
package. It allocates and deallocates a
Java virtual machine, looks up Java
method IDs, and calls the Java methods.
Voce’s API (which is identical in the
Java and C++ versions) was designed to
be as simple as possible, consisting of
only eight functions (see Appendix A for
a more detailed description).
|
If the header does what they say it does, then your problem may have something to do with the placement of your files in directories.
I don't know which compiler/IDE you're using, but I use Visual C++ 2008 express.
Depending on your compiler/IDE and OS architecture, these directories may be different.
If I were developing software with VOCE, these are the directories I would move the following files to.
Move these .jar files...
voce-0.9.1 > lib >
- cmu_us_kal.jar
- cmulex.jar
- en_us.jar
- freetts.jar
- jsapi.jar
- sphinx4.jar
- WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar
to
Program Files > Microsoft Visual Studio 9.0 > VC > lib
and move this header
voce-0.9.1 > src > c++ > voce.h
either to
Program Files > Microsoft Visual Studio 9.0 > VC > include
or to your project's local directory.