Trying edu.cmu.sphinx.pocketsphinx with processRaw to detect speech.
Using the following config:
en-us.lm.bin language model
en-us-ptm acoustic model
cmudict-en-us.dict dictionary
also setting remove_noise to True and samprate to 8000
I want to do a Ngram Search.
This is the loop I use:
Decoder decoder = recognizer.getDecoder();
int chunk_size = 1024;
int index_start = 0;
int index_finish = index_start+chunk_size-1;
boolean doit = true;
decoder.startUtt();
while (doit)
{
short[] slice = Arrays.copyOfRange(audioBuffer, index_start, index_finish);
int processRawRes = decoder.processRaw((slice), slice.length, false, false);
index_start = index_finish;
index_finish = index_start+chunk_size-1;
if (index_finish>audioBuffer.length-1)
{
doit = false;
}
}// while (doit)
decoder.endUtt();
When do I call
decoder.getInSpeech();
Thanks.