Sphinx-4 Confidence Score Demo

This is a simple command line program that shows how to obtain confidence scores using Sphinx-4.
NOTE: this work on confidence scores is still experimental, so please use it with precaution.

When you start up the demo program the following will show:

Loading Recognizer...

Sample sentences:

the green one right in the middle
the purple one on the lower right side
the closest purple one on the far left side
the only one left on the left

Refer to the file confidence.test for a complete list.

Start speaking. Press Ctrl-C to quit.

<s> <sil> <sil> a purple one on the top right corner </s>
     (confidence: 0.6045)

     <s>        (confidence: 1)
     <sil>      (confidence: 1)
     <sil>      (confidence: 1)
     a          (confidence: 0.6045)
     purple     (confidence: 1)
     one        (confidence: 1)
     on         (confidence: 1)
     the        (confidence: 1)
     top        (confidence: 1)
     right      (confidence: 1)
     corner     (confidence: 1)
     </s>       (confidence: 1)

As you can see, it will show the confidence of the result as a value between 0 and 1 (in this case its 0.6045). It will also show the confidence of each word in the result. In this case, its all 1's except for the word 'a' (0.6045). Note that the confidence of the result is computed as a product of the confidence of its constituent words, which is why the confidence of the result is 0.6045 in this case.

There is a test file which contains a list of sentences you can say to test the application.

The code for this demo is in Confidence.java, which can serve as example code on how to obtain confidence scores.

Building

Check the bin directory to see if it has the file Confidence.jar. If not, type the following at the top level directory:

ant -find demo.xml

Running

First make sure that you have JSAPI setup correctly. Then, To run the demo, type:

sphinx4> java -mx200m -jar bin/Confidence.jar

Use the sentences in the test file to test the demo.

NOTE:

  1. Make sure that you give it a large enough heap by putting in "-mx200m".
  2. Make sure that you are using JavaTM 2 SDK, Standard Edition, v1.4 or higher.
  3. If you are running Linux and have problems with the audio, please read the Linux JavaSound section.
  4. If you have the source distribution, make sure that the JAR file lib/sphinx4.jar is built. If not, go to the top level directory and type: ant


Copyright 1999-2004 Carnegie Mellon University.
Portions Copyright 2002-2004 Sun Microsystems, Inc.
Portions Copyright 2002-2004 Mitsubishi Electric Research Laboratories.
All Rights Reserved. Usage is subject to license terms.