Menu

PocketSphinx with wave file as input

Help
ashwani
2012-05-11
2012-09-22
  • ashwani

    ashwani - 2012-05-11

    I have successfully ported Pocketsphinx on android with a very good accuracy
    with my own adopted and trained acoustic model.
    Now I am facing a problem with recognition from a wav file. Firstly I read a
    wav file as a byte array and then convert that byte array to a short array and
    than pass it to the ProcessRaw function but I am getting
    hyp = getHyp => hyp = null
    and also in one effort I got some partial results also...example I pass a wave
    file having "TUNER" ,convert it to byte array then short array and pass to
    ProcessRaw I got results like "TO", "TAKE", "THE".
    What could be the possible issue and also Please suggest some other way round
    to achieve this programmically .
    I already know there is a script (pocketsphinx_batch) to test wav files but i
    want to do this in java.
    Thanks In advance.

     
  • Nickolay V. Shmyrev

    What could be the possible issue and also Please suggest some other way
    round to achieve this programmicall

    The reason for bad recognition is corrupted input data. You didn't correct
    data to the required format before you pass it into pocketsphinx. The audio
    must have specific sample rate, number of channels, number of bits per sample
    according to the configuration of your decoder.

     

Log in to post a comment.