Sphinx-4 WAV File Demo |
A simple Sphinx-4 application that decodes a .wav file containing connnected-digits audio data. The audio format itself should be PCM-linear, with the sample rate, bits per sample, sign and endianness as specified in the config.xml file. You can supply your own audio file to be tested. If you do not supply one, a default audio file will be used.
Check if the bin
directory already has the
WavFile.jar
file. If not, type the following in the top
level directory:
ant -find demo.xml
First make sure that you have JSAPI setup correctly. Then, to run the demo, type:
sphinx4> java -jar bin/WavFile.jar
You will see the following result:
Loading Recognizer... Decoding file:/home/pkwok/cvs/cmusphinx/sphinx4/bin/WavFile.jar!/demo/sphinx/wavfile/12345.wav WAVE (.wav) file, byte length: 92044, data format: PCM_SIGNED, 16000.0 Hz, 16 bit, mono, little-endian, audio data, frame length: 46000 RESULT: one two three four five
NOTE:
lib/sphinx4.jar
is built. If not, go to the top level
directory and type: ant
java -jar bin/WavFile.jar ./demo/sphinx/wavfile/65536.wav