Search code examples
javasphinx4

cmu sphinx java - Executable example code


I recently installed CMU Sphinx4 to use for my Java application requiring speech recognition. However, most of the source code I could find online for Sphinx4 shows some error in Eclipse. I downloaded the JAR files (sphinx4-data..., sphinx4-core...) and added them to my libraries in my build path; however, there are still errors (for example, it cannot recognize the Speech class). Can anyone give me the bare minimum it takes to listen to input and print it onto the console?

Thank you.


Solution

  • The demos are available in sources:

    https://github.com/cmusphinx/sphinx4/blob/master/sphinx4-samples/src/main/java/edu/cmu/sphinx/demo/transcriber/TranscriberDemo.java

    The tutorial describing the API is provided here:

    http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4