However, I'm having troubles getting it right. Here is my code. It simply has a button to load audio and another to perform the recognition. I configure the decoder in the onCreate:
public class PocketSphinxActivity extends Activity{
publicstaticfinalStringTAG="MainActivity";privateButtonloadBtn;privateButtonprocessBtn;static{System.loadLibrary("pocketsphinx_jni");}Configc;Decoderps;FileInputStreamstream;@OverridepublicvoidonCreate(Bundlestate){super.onCreate(state);setContentView(R.layout.main);c=Decoder.defaultConfig();/*Configuringdecoderobject*/c.setString("-hmm",Environment.getExternalStorageDirectory()+"/Android/data/edu.cmu.pocketsphinx/hmm/en-us");c.setString("-dict",Environment.getExternalStorageDirectory()+"/Android/data/edu.cmu.pocketsphinx/lm/cmudict-en-us.dict");c.setString("-lm",Environment.getExternalStorageDirectory()+"/Android/data/edu.cmu.pocketsphinx/lm/en-us.lm.dmp");c.setString("-rawlogdir",Environment.getExternalStorageDirectory()+"/Android/data/edu.cmu.pocketsphinx");ps=newDecoder(c);Log.i(TAG,"Finished configuring decoder object...");loadBtn=(Button)findViewById(R.id.loadBtn);processBtn=(Button)findViewById(R.id.processBtn);loadBtn.setOnClickListener(newView.OnClickListener(){@OverridepublicvoidonClick(Viewview){Log.i(TAG,"Clicked load file...");try{finalFilefile=newFile(Environment.getExternalStorageDirectory(),"/audio_files/1mb.wav");Uriuri=Uri.fromFile(file);FileauxFile=newFile(uri.getPath());stream=newFileInputStream(auxFile);Log.i(TAG,"Done loading file...");}catch(FileNotFoundExceptione){//TODOAuto-generatedcatchblocke.printStackTrace();}}});processBtn.setOnClickListener(newView.OnClickListener(){publicvoidonClick(Viewv){Log.i(TAG,"Clicked process file...");ps.startUtt();byte[]b=newbyte[4096];try{intnbytes;while((nbytes=stream.read(b))>=0){ByteBufferbb=ByteBuffer.wrap(b,0,nbytes);short[]s=newshort[nbytes/2];bb.asShortBuffer().get(s);ps.processRaw(s,nbytes/2,false,false);}}catch(IOExceptione){Log.i(TAG,"Error when reading .wav: "+e.getMessage());}ps.endUtt();System.out.println(ps.hyp().getHypstr());for(Segmentseg:ps.seg()){System.out.println(seg.getWord());};}});}
}
I noticed that the logcat says No JNI_OnLoad found. Here is the log:
Any clue on what I'm doing wrong here?
Thanks for your response. I think there is still something I'm missing about my audio file format. I repeated the experiment as you requested with 16khz file little endian. But still the output is far inaccurate. You can find attached a copy from the audio file and the raw log file on the Android device. Also, here is an out form the command line that verifies the file format:
I personally recorded the file using Audacity on Mac. I'm not concerned at this point in time about the accuracy. I just want to know why although there are multiple greeting words in the file. The result is simply "For" when I sure the command ** System.out.println("TOTAL RESULT: "+ps.hyp().getHypstr()); ** after ** ps.endUtt(); **
Thanks Nickolay. For future reference for those who come across this post, I tried your recommendation on converting to little endian in the code and it solved my problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to follow recommendation from this stackoverflow link on how to perform speech recognition on .wav file:
http://stackoverflow.com/questions/29008111/give-a-file-as-input-to-pocketsphinx-on-android
However, I'm having troubles getting it right. Here is my code. It simply has a button to load audio and another to perform the recognition. I configure the decoder in the onCreate:
public class PocketSphinxActivity extends Activity{
}
I noticed that the logcat says No JNI_OnLoad found. Here is the log:
Any clue on what I'm doing wrong here?
06-03 06:54:15.408 30972-30972/edu.cmu.sphinx.pocketsphinx D/dalvikvm﹕ Trying to load lib /data/app-lib/edu.cmu.sphinx.pocketsphinx-16/libpocketsphinx_jni.so 0x41da1f90
06-03 06:54:15.408 30972-30972/edu.cmu.sphinx.pocketsphinx D/dalvikvm﹕ Added shared lib /data/app-lib/edu.cmu.sphinx.pocketsphinx-16/libpocketsphinx_jni.so 0x41da1f90
06-03 06:54:15.408 30972-30972/edu.cmu.sphinx.pocketsphinx D/dalvikvm﹕ No JNI_OnLoad found in /data/app-lib/edu.cmu.sphinx.pocketsphinx-16/libpocketsphinx_jni.so 0x41da1f90, skipping init
06-03 06:54:15.458 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ onDecode : QmageDecodeFrame 20140421 Rev.6376
06-03 06:54:15.458 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ This is decoding
06-03 06:54:15.458 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ decoding stream->hasLength()
06-03 06:54:15.458 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ onDecode : QmageDecParseHeader call : QM
06-03 06:54:15.458 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ Qmage parsing for decoding ok
06-03 06:54:15.458 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ onDecode : QmageHeader.NinePatched 0
06-03 06:54:15.458 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ onDecode : QmageHeader Height() 22 Width() : 16 sampleSize : 1
06-03 06:54:15.458 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ Qmage Make Color table
06-03 06:54:15.458 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ SkBitmap::kIndex8_Config == config && 1 == sampleSize
06-03 06:54:15.468 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ onDecode : return true QM
06-03 06:54:15.508 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ onDecode : QmageDecodeFrame 20140421 Rev.6376
06-03 06:54:15.508 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ This is decoding
06-03 06:54:15.508 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ decoding stream->hasLength()
06-03 06:54:15.508 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ onDecode : QmageDecParseHeader call : QM
06-03 06:54:15.508 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ Qmage parsing for decoding ok
06-03 06:54:15.508 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ onDecode : QmageHeader.NinePatched 0
06-03 06:54:15.508 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ onDecode : QmageHeader Height() 48 Width() : 48 sampleSize : 1
06-03 06:54:15.508 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ normal image decoding
06-03 06:54:15.508 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ onDecode : QmageDecodeFrame call : QM
06-03 06:54:15.518 30972-30972/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ onDecode : return true QM
06-03 06:54:15.518 30972-30990/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ onDecode : QmageDecodeFrame 20140421 Rev.6376
06-03 06:54:15.538 30972-30990/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ This is decoding
06-03 06:54:15.538 30972-30990/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ decoding stream->hasLength()
06-03 06:54:15.538 30972-30990/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ onDecode : QmageDecParseHeader call : QM
06-03 06:54:15.538 30972-30990/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ Qmage parsing for decoding ok
06-03 06:54:15.538 30972-30990/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ onDecode : QmageHeader.NinePatched 0
06-03 06:54:15.538 30972-30990/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ onDecode : QmageHeader Height() 22 Width() : 16 sampleSize : 1
06-03 06:54:15.538 30972-30990/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ Qmage Make Color table
06-03 06:54:15.538 30972-30990/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ SkBitmap::kIndex8_Config == config && 1 == sampleSize
06-03 06:54:15.538 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: cmd_ln.c(697): Parsing command line:
06-03 06:54:15.538 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ [ 06-03 06:54:15.538 30972:30972 I/cmusphinx ]
Current configuration:
06-03 06:54:15.548 30972-30990/edu.cmu.sphinx.pocketsphinx E/Qmage﹕ onDecode : return true QM
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: cmd_ln.c(697): Parsing command line:
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ \
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -nfilt
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 25
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ \
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -lowerf
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 130
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ \
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -upperf
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 6800
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ \
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -transform
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ dct
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ \
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -lifter
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 22
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ \
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -feat
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 1s_c_d_dd
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ \
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -agc
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ none
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ \
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -cmn
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ current
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ \
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -varnorm
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ no
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ \
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -cmninit
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 40
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ [ 06-03 06:54:15.588 30972:30972 I/cmusphinx ]
Current configuration:
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: acmod.c(252): Parsed model-specific feature parameters from /storage/emulated/0/Android/data/edu.cmu.pocketsphinx/hmm/en-us/feat.params
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: feat.c(715): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='current', VARNORM='no', AGC='none'
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: cmn.c(143): mean[0]= 12.00, mean[1..12]= 0.0
06-03 06:54:15.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: acmod.c(161): Reading linear feature transformation from /storage/emulated/0/Android/data/edu.cmu.pocketsphinx/hmm/en-us/feature_transform
06-03 06:54:15.598 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: mdef.c(518): Reading model definition: /storage/emulated/0/Android/data/edu.cmu.pocketsphinx/hmm/en-us/mdef
06-03 06:54:17.360 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: bin_mdef.c(181): Allocating 173954 * 8 bytes (1359 KiB) for CD tree
06-03 06:54:17.450 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: tmat.c(206): Reading HMM transition probability matrices: /storage/emulated/0/Android/data/edu.cmu.pocketsphinx/hmm/en-us/transition_matrices
06-03 06:54:17.450 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: acmod.c(124): Attempting to use PTM computation module
06-03 06:54:17.460 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /storage/emulated/0/Android/data/edu.cmu.pocketsphinx/hmm/en-us/means
06-03 06:54:17.650 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(292): 6138 codebook, 1 feature, size:
06-03 06:54:17.650 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(294): 32x32
06-03 06:54:17.650 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /storage/emulated/0/Android/data/edu.cmu.pocketsphinx/hmm/en-us/variances
06-03 06:54:18.171 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(292): 6138 codebook, 1 feature, size:
06-03 06:54:18.171 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(294): 32x32
06-03 06:54:20.053 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(354): 768 variance values floored
06-03 06:54:20.053 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ptm_mgau.c(801): Number of codebooks exceeds 256: 6138
06-03 06:54:20.083 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: acmod.c(126): Attempting to use semi-continuous computation module
06-03 06:54:20.093 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /storage/emulated/0/Android/data/edu.cmu.pocketsphinx/hmm/en-us/means
06-03 06:54:20.253 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(292): 6138 codebook, 1 feature, size:
06-03 06:54:20.253 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(294): 32x32
06-03 06:54:20.253 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /storage/emulated/0/Android/data/edu.cmu.pocketsphinx/hmm/en-us/variances
06-03 06:54:20.383 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(292): 6138 codebook, 1 feature, size:
06-03 06:54:20.383 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(294): 32x32
06-03 06:54:22.185 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(354): 768 variance values floored
06-03 06:54:22.215 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: acmod.c(128): Falling back to general multi-stream GMM computation
06-03 06:54:22.215 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /storage/emulated/0/Android/data/edu.cmu.pocketsphinx/hmm/en-us/means
06-03 06:54:22.445 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(292): 6138 codebook, 1 feature, size:
06-03 06:54:22.445 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(294): 32x32
06-03 06:54:22.445 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /storage/emulated/0/Android/data/edu.cmu.pocketsphinx/hmm/en-us/variances
06-03 06:54:22.685 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(292): 6138 codebook, 1 feature, size:
06-03 06:54:22.685 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(294): 32x32
06-03 06:54:24.577 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_gauden.c(354): 768 variance values floored
06-03 06:54:24.587 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_senone.c(149): Reading senone mixture weights: /storage/emulated/0/Android/data/edu.cmu.pocketsphinx/hmm/en-us/mixture_weights
06-03 06:54:24.587 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_senone.c(200): Truncating senone logs3(pdf) values by 10 bits
06-03 06:54:24.587 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_senone.c(207): Not transposing mixture weights in memory
06-03 06:54:24.657 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_senone.c(268): Read mixture weights for 6138 senones: 1 features x 32 codewords
06-03 06:54:24.657 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_senone.c(320): Mapping senones to individual codebooks
06-03 06:54:24.657 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ms_mgau.c(141): The value of topn: 4
06-03 06:54:24.657 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: phone_loop_search.c(114): State beam -225 Phone exit beam -225 Insertion penalty 0
06-03 06:54:24.767 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: dict.c(320): Allocating 137525 * 20 bytes (2686 KiB) for word entries
06-03 06:54:24.767 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: dict.c(333): Reading main dictionary: /storage/emulated/0/Android/data/edu.cmu.pocketsphinx/lm/cmudict-en-us.dict
06-03 06:54:25.468 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: dict.c(213): Allocated 1007 KiB for strings, 1662 KiB for phones
06-03 06:54:25.468 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: dict.c(336): 133420 words read
06-03 06:54:25.468 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: dict.c(358): Reading filler dictionary: /storage/emulated/0/Android/data/edu.cmu.pocketsphinx/hmm/en-us/noisedict
06-03 06:54:25.468 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: dict.c(213): Allocated 0 KiB for strings, 0 KiB for phones
06-03 06:54:25.468 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: dict.c(361): 9 words read
06-03 06:54:25.468 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: dict2pid.c(396): Building PID tables for dictionary
06-03 06:54:25.468 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: dict2pid.c(406): Allocating 46^3 * 2 bytes (190 KiB) for word-initial triphones
06-03 06:54:25.578 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: dict2pid.c(132): Allocated 25576 bytes (24 KiB) for word-final triphones
06-03 06:54:25.588 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: dict2pid.c(196): Allocated 25576 bytes (24 KiB) for single-phone word triphones
06-03 06:54:25.938 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_model_arpa.c(77): No \data\ mark in LM file
06-03 06:54:25.938 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_model_dmp.c(142): Will use memory-mapped I/O for LM file
06-03 06:54:25.938 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_model_dmp.c(196): ngrams 1=19794, 2=1377200, 3=3178194
06-03 06:54:25.948 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_model_dmp.c(242): 19794 = LM.unigrams(+trailer) read
06-03 06:54:25.948 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_model_dmp.c(288): 1377200 = LM.bigrams(+trailer) read
06-03 06:54:25.948 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_model_dmp.c(314): 3178194 = LM.trigrams read
06-03 06:54:25.958 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_model_dmp.c(339): 57155 = LM.prob2 entries read
06-03 06:54:25.958 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_model_dmp.c(359): 10935 = LM.bo_wt2 entries read
06-03 06:54:25.958 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_model_dmp.c(379): 34843 = LM.prob3 entries read
06-03 06:54:25.958 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_model_dmp.c(407): 2690 = LM.tseg_base entries read
06-03 06:54:25.978 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_model_dmp.c(463): 19794 = ascii word strings read
06-03 06:54:26.429 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(99): 788 unique initial diphones
06-03 06:54:26.429 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(148): 0 root, 0 non-root channels, 58 single-phone words
06-03 06:54:26.429 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(186): Creating search tree
06-03 06:54:26.439 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(192): before: 0 root, 0 non-root channels, 58 single-phone words
06-03 06:54:26.669 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(326): after: max nonroot chan increased to 44861
06-03 06:54:26.669 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(339): after: 572 root, 44733 non-root channels, 49 single-phone words
06-03 06:54:26.669 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(157): fwdflat: min_ef_width = 4, max_sf_win = 25
06-03 06:54:26.669 30972-30972/edu.cmu.sphinx.pocketsphinx I/MainActivity﹕ Finished configuring decoder object...
06-03 06:54:26.799 30972-30972/edu.cmu.sphinx.pocketsphinx D/GC﹕ <tid=30972> OES20 ===> GC Version : GC Ver rls_pxa988_KK44_GC13.20
06-03 06:54:26.939 30972-30972/edu.cmu.sphinx.pocketsphinx D/OpenGLRenderer﹕ Enabling debug mode 0
06-03 06:54:40.783 30972-30972/edu.cmu.sphinx.pocketsphinx I/MainActivity﹕ Clicked load file...
06-03 06:54:40.783 30972-30972/edu.cmu.sphinx.pocketsphinx I/MainActivity﹕ Done loading file...
06-03 06:54:48.090 30972-30972/edu.cmu.sphinx.pocketsphinx I/MainActivity﹕ Clicked process file...
06-03 06:54:48.090 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: pocketsphinx.c(958): Writing raw audio log file: /storage/emulated/0/Android/data/edu.cmu.pocketsphinx/000000000.raw
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: cmn_prior.c(131): cmn_prior_update: from <
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 40.00
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ >
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: cmn_prior.c(149): cmn_prior_update: to <
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 98.82
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -23.61
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -6.57
06-03 06:54:49.862 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -6.69
06-03 06:54:49.872 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -4.62
06-03 06:54:49.872 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -4.16
06-03 06:54:49.872 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -2.39
06-03 06:54:49.872 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -2.82
06-03 06:54:49.872 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -2.01
06-03 06:54:49.872 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -1.63
06-03 06:54:49.872 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -0.73
06-03 06:54:49.872 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -1.35
06-03 06:54:49.872 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -1.23
06-03 06:54:49.872 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ >
06-03 06:54:49.892 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(1553): 203 words recognized (2/fr)
06-03 06:54:49.892 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(1555): 43856 senones evaluated (462/fr)
06-03 06:54:49.902 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(1559): 41430 channels searched (436/fr), 14626 1st, 9013 last
06-03 06:54:49.902 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(1562): 556 words for which last channels evaluated (5/fr)
06-03 06:54:49.902 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(1564): 475 candidate words for entering last phone (5/fr)
06-03 06:54:49.902 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(1567): fwdtree 1.61 CPU 1.695 xRT
06-03 06:54:49.902 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(1570): fwdtree 1.81 wall 1.907 xRT
06-03 06:54:49.902 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(302): Utterance vocabulary contains 4 words
06-03 06:54:50.192 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(948): 126 words recognized (1/fr)
06-03 06:54:50.192 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(950): 13008 senones evaluated (137/fr)
06-03 06:54:50.192 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(952): 7909 channels searched (83/fr)
06-03 06:54:50.192 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(954): 653 words searched (6/fr)
06-03 06:54:50.192 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(957): 116 word transitions (1/fr)
06-03 06:54:50.192 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(960): fwdflat 0.28 CPU 0.295 xRT
06-03 06:54:50.192 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(963): fwdflat 0.30 wall 0.312 xRT
06-03 06:54:50.192 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search.c(1200): not found in last frame, using asked.93 instead
06-03 06:54:50.192 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search.c(1253): lattice start node
.0 end node asked(2).3</tid=30972>06-03 06:54:50.192 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search.c(1279): Eliminated 0 nodes before end node
06-03 06:54:50.202 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search.c(1384): Lattice has 32 nodes, 1 links
06-03 06:54:50.202 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ps_lattice.c(1380): Bestpath score: -990
06-03 06:54:50.202 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ps_lattice.c(1384): Normalizer P(O) = alpha(asked(2):3:93) = -173631
06-03 06:54:50.202 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ps_lattice.c(1441): Joint P(O,S) = -173631 P(S|O) = 0
06-03 06:54:50.202 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search.c(875): bestpath 0.00 CPU 0.000 xRT
06-03 06:54:50.202 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search.c(878): bestpath 0.00 wall 0.004 xRT
06-03 06:54:50.202 30972-30972/edu.cmu.sphinx.pocketsphinx I/System.out﹕ asked
06-03 06:54:50.202 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search.c(1030): bestpath 0.00 CPU 0.000 xRT
06-03 06:54:50.202 30972-30972/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search.c(1033): bestpath 0.00 wall 0.000 xRT
06-03 06:54:50.202 30972-30972/edu.cmu.sphinx.pocketsphinx I/System.out﹕
06-03 06:54:50.212 30972-30972/edu.cmu.sphinx.pocketsphinx I/System.out﹕ asked(2)
Here is a copy from log file
Your code is correct. Your input wav file format is wrong. It must be 16khz little endian. Your input file is 8khz big endian it seems.
Thanks for your response. I think there is still something I'm missing about my audio file format. I repeated the experiment as you requested with 16khz file little endian. But still the output is far inaccurate. You can find attached a copy from the audio file and the raw log file on the Android device. Also, here is an out form the command line that verifies the file format:
engr2-25-241-dhcp:Desktop khaledalalnezi$ file greetings.wav
greetings.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 16000 Hz
I personally recorded the file using Audacity on Mac. I'm not concerned at this point in time about the accuracy. I just want to know why although there are multiple greeting words in the file. The result is simply "For" when I sure the command ** System.out.println("TOTAL RESULT: "+ps.hyp().getHypstr()); ** after ** ps.endUtt(); **
Here is the Android logcat:
06-03 20:15:09.625 6982-6982/edu.cmu.sphinx.pocketsphinx I/MainActivity﹕ Clicked process file...
06-03 20:15:09.625 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: pocketsphinx.c(958): Writing raw audio log file: /storage/emulated/0/Android/data/edu.cmu.pocketsphinx/000000000.raw
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: cmn_prior.c(99): cmn_prior_update: from <
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 40.00
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.00
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ >
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: cmn_prior.c(116): cmn_prior_update: to <
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 82.52
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -9.16
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.63
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -1.49
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -1.17
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -3.00
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.59
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -2.22
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.24
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -1.00
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.61
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -1.32
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.01
06-03 20:15:21.607 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ >
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: cmn_prior.c(131): cmn_prior_update: from <
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 82.52
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -9.16
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.63
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -1.49
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -1.17
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -3.00
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.59
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -2.22
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.24
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -1.00
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.61
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -1.32
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.01
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ >
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: cmn_prior.c(149): cmn_prior_update: to <
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 82.52
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -9.16
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.63
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -1.49
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -1.17
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -3.00
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.59
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -2.22
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.24
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -1.00
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.61
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ -1.32
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ 0.01
06-03 20:15:21.667 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ >
06-03 20:15:21.717 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(1553): 4717 words recognized (6/fr)
06-03 20:15:21.717 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(1555): 368891 senones evaluated (462/fr)
06-03 20:15:21.717 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(1559): 339163 channels searched (424/fr), 49652 1st, 112931 last
06-03 20:15:21.717 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(1562): 7005 words for which last channels evaluated (8/fr)
06-03 20:15:21.717 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(1564): 8267 candidate words for entering last phone (10/fr)
06-03 20:15:21.717 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(1567): fwdtree 11.79 CPU 1.476 xRT
06-03 20:15:21.717 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdtree.c(1570): fwdtree 12.09 wall 1.513 xRT
06-03 20:15:21.717 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(302): Utterance vocabulary contains 81 words
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(948): 1765 words recognized (2/fr)
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(950): 225556 senones evaluated (282/fr)
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(952): 185161 channels searched (231/fr)
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(954): 14588 words searched (18/fr)
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(957): 3798 word transitions (4/fr)
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(960): fwdflat 5.12 CPU 0.641 xRT
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search_fwdflat.c(963): fwdflat 5.13 wall 0.642 xRT
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search.c(1200): not found in last frame, using for.797 instead
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search.c(1253): lattice start node
.0 end node for(2).306-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search.c(1279): Eliminated 264 nodes before end node
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search.c(1384): Lattice has 296 nodes, 1 links
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ps_lattice.c(1380): Bestpath score: -672
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ps_lattice.c(1384): Normalizer P(O) = alpha(for(2):3:797) = -820785
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ps_lattice.c(1441): Joint P(O,S) = -820785 P(S|O) = 0
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search.c(875): bestpath 0.00 CPU 0.000 xRT
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search.c(878): bestpath 0.00 wall 0.000 xRT
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/System.out﹕ TOTAL RESULT: for
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search.c(1030): bestpath 0.00 CPU 0.000 xRT
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/cmusphinx﹕ INFO: ngram_search.c(1033): bestpath 0.00 wall 0.000 xRT
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/System.out﹕
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/System.out﹕ for(2)
06-03 20:15:26.852 6982-6982/edu.cmu.sphinx.pocketsphinx I/System.out﹕ Finished processing file...
Well, the issue is that it just converts the data to bigendian. You might add order() call
And here is latest raw file.
Thanks Nickolay. For future reference for those who come across this post, I tried your recommendation on converting to little endian in the code and it solved my problem.