Sphinx-4 Lattice Demo

A simple Sphinx-4 application that transcribes a continuous audio file that has multiple utterances and creates a lattice using the results. The default file, called "10001-90210-01803.wav", contains three utterances, separated by silences. Please note that the recognition accuracy will be very poor due to the choice of wav file.

Building

Check if the bin directory already has the LatticeDemo.jar file. If not, type the following in the top level directory:

ant -find demo.xml

Running

To run the demo, type:

sphinx4> java -mx256m -jar bin/LatticeDemo.jar

You will see the following result, with each utterance on its own line:

java -mx256m -jar bin/LatticeDemo.jar 
Loading...
12:01.619 WARNING dictionary        Missing word: <unk>
                   in edu.cmu.sphinx.linguist.dictionary.FastDictionary:getWord-dictionary
12:01.502 WARNING dictionary        Missing word: <unk>
                   in edu.cmu.sphinx.linguist.dictionary.FastDictionary:getWord-dictionary
 <s> <sil> <sil> what's there owns their o. zero one <sil> </s>
 <s> <sil> <sil> what's there owns their o. zero one </s>
 <s> <sil> <sil> what's there owns their o. zero one <sil> <sil> </s>
 <s> <sil> <sil> what's there owns their o. zero one <sil> </s>
 <s> <sil> <sil> what's there owns their o. zero one <sil> to <sil> </s>
 <s> <sil> <sil> what's there owns their o. zero one <sil> to </s>
 <s> <sil> <sil> what's there owns their o. zero one <sil> to <sil> <sil> </s>
 <s> <sil> <sil> what's there owns their o. zero one <sil> to <sil> </s>
 <s> <sil> <sil> what's there owns their o. zero when </s>
 <s> <sil> <sil> what's there owns their o. zero when <sil> </s>
 <s> <sil> <sil> what's there owns their o. zero when <sil> <sil> </s>
 <s> <sil> <sil> what's there owns their o. zero when <sil> </s>
 <s> <sil> <sil> what's there owns their o. zero while <sil> </s>
 <s> <sil> <sil> what's there owns their o. zero while <sil> <sil> </s>
 <s> <sil> <sil> what's there owns their o. zero while <sil> </s>
 <s> <sil> <sil> what's there owns their o. zero while </s>
 <s> <sil> <sil> what's there owns their o. zero want </s>
 <s> <sil> <sil> what's there owns their o. zero want <sil> </s>
 <s> <sil> <sil> what's there owns their o. zero want <sil> </s>
 <s> <sil> <sil> what's there owns their o. zero want <sil> <sil> </s>
 <s> <sil> <sil> what's there owns their o. zero want </s>
 <s> <sil> <sil> what's there owns their oh zero one <sil> </s>
 <s> <sil> <sil> what's there owns their oh zero one </s>
 <s> <sil> <sil> what's there owns their oh zero one <sil> <sil> </s>
 <s> <sil> <sil> what's there owns their oh zero one <sil> </s>
 <s> <sil> <sil> what's there owns their oh zero one <sil> to <sil> </s>
 <s> <sil> <sil> what's there owns their oh zero one <sil> to </s>
 <s> <sil> <sil> what's there owns their oh zero one <sil> to <sil> <sil> </s>
 <s> <sil> <sil> what's there owns their oh zero one <sil> to <sil> </s>
 <s> <sil> <sil> what's there owns their oh zero want </s>
 <s> <sil> <sil> what's there owns their oh zero want <sil> </s>
 <s> <sil> <sil> what's there owns their oh zero want <sil> </s>
 <s> <sil> <sil> what's there owns their oh zero want <sil> <sil> </s>
 <s> <sil> <sil> what's there owns their oh zero want </s>
I heard: what's there owns their o. zero one

 <s> <sil> dynamics to one oh <sil> </s>
 <s> <sil> dynamics to one oh </s>
 <s> <sil> dynamics to one oh </s>
 <s> <sil> dynamics to one o. </s>
 <s> <sil> dynamics to one o. </s>
 <s> <sil> dynamics to one o. <sil> </s>
I heard: dynamics to one oh

 <s> <sil> zero one eight searle three <sil> </s>
 <s> <sil> zero one eight searle three </s>
 <s> <sil> zero one eight searle three <sil> <sil> </s>
 <s> <sil> zero one eight searle three <sil> </s>
 <s> <sil> zero one eight searle three e. </s>
 <s> <sil> zero one eight searle three e. <sil> </s>
 <s> <sil> zero one eight searle three e. <sil> <sil> </s>
 <s> <sil> zero one eight searle three e. <sil> </s>
 <s> <sil> zero one eight searle three e. </s>
 <s> <sil> zero one eight searle three u. <sil> </s>
 <s> <sil> zero one eight searle three u. </s>
 <s> <sil> zero one eight searle three </s>
 <s> <sil> searle one eight searle three <sil> </s>
 <s> <sil> searle one eight searle three </s>
 <s> <sil> searle one eight searle three <sil> <sil> </s>
 <s> <sil> searle one eight searle three <sil> </s>
 <s> <sil> searle one eight searle three e. </s>
 <s> <sil> searle one eight searle three e. <sil> </s>
 <s> <sil> searle one eight searle three e. <sil> <sil> </s>
 <s> <sil> searle one eight searle three e. <sil> </s>
 <s> <sil> searle one eight searle three e. </s>
 <s> <sil> searle one eight searle three u. <sil> </s>
 <s> <sil> searle one eight searle three u. </s>
 <s> <sil> searle one eight searle three </s>
I heard: zero one eight searle three
      

NOTE:

  1. Make sure that you are using JavaTM 2 SDK, Standard Edition, v1.4 or higher.
  2. 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
  3. You can supply your own test files. Just make sure that the audio format is the same as in the config.xml file, which is 16-bit signed PCM-linear, 16kHz, little-endian. The audio file format can be any format readable by Java Sound, e.g., .wav, .au. To test your own file, supply it as an argument. Suppose your test file is called test.wav, then:

    java -jar bin/LatticeDemo.jar test.wav


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.