I was wondering if there was any way to Bind the java code with C++. I would really like to use Sphinx 4's but my application software is written in C++. Has anyone tried this before?
Thanks in advance,
Mike
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for the delayed response, a bunch of us were on vacation last week. Probably the best way to do this is to set up the recognizer as a server that reads audio from a socket and writes the results back to the socket. Your C++ app could talk to it though the sockets.
Paul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Btw, yes, I have had success doing this (calling Sphinx4 and FreeTTS functions from my C++ application). The JNI allows your C++ app to allocate a Java virtual machine, pass in the Java class path, call Java functions, and much more. I have a simple setup where I create a Java class with a bunch of static functions containing all the Sphinx4 and FreeTTS functionality I need, then I call those static functions from the C++ side. It works pretty well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was wondering if there was any way to Bind the java code with C++. I would really like to use Sphinx 4's but my application software is written in C++. Has anyone tried this before?
Thanks in advance,
Mike
Mike:
Sorry for the delayed response, a bunch of us were on vacation last week. Probably the best way to do this is to set up the recognizer as a server that reads audio from a socket and writes the results back to the socket. Your C++ app could talk to it though the sockets.
Paul
Check out the Java Native Interface for more info on calling Java functions from C++ code:
http://java.sun.com/docs/books/tutorial/native1.1/
Btw, yes, I have had success doing this (calling Sphinx4 and FreeTTS functions from my C++ application). The JNI allows your C++ app to allocate a Java virtual machine, pass in the Java class path, call Java functions, and much more. I have a simple setup where I create a Java class with a bunch of static functions containing all the Sphinx4 and FreeTTS functionality I need, then I call those static functions from the C++ side. It works pretty well.