Menu

Sphinx 4 with C++

Help
Mike
2004-07-06
2012-09-22
  • Mike

    Mike - 2004-07-06

    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

     
    • Paul Lamere

      Paul Lamere - 2004-07-12

      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

       
    • tylerstreeter

      tylerstreeter - 2005-04-25

      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/

       
    • tylerstreeter

      tylerstreeter - 2005-04-25

      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.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.