Menu

Getting started

Help
mehdi
2011-04-11
2012-09-22
  • mehdi

    mehdi - 2011-04-11

    Hello every one.
    I'm trying to use the pocketshynx librairy for a while in C, and i'm still
    not able to recognize anything...
    I try to make some test from the goforward sample.
    So, when i use the goforward raw file from the package, the sentence is
    recognized. But, if I try to record my own one, with the same sentence, but
    form my microphone, i get the following message:

    WARNING: "ngram_search.c", line 1087: </s> not found in last frame, using <s> instead
    INFO: ngram_search.c(1137): lattice start node <s>.0 end node <s>.0
    INFO: ps_lattice.c(1228): Normalizer P(O) = alpha(<s>:0:242) = -537889843
    

    Is someone can help me, or give me a simple previous code sample which can
    record one unique given sentence and recognize it from the microphone (using
    alsa)
    Thanks.
    Ps: i've theoreticals and practicals basics in speech recognition, using HTK,
    Julius, and Julian, but i want use Sphinx because of the C api.

    Thanks again!

     
  • Nickolay V. Shmyrev

    You are recording in the wrong format.

    File must be 16khz 16bit mono MSWAV file. That is one of the practical basics
    using HTK, Julius or any other ASR engine.

     
  • mehdi

    mehdi - 2011-04-11

    Yes i guess it's something wrong about the recording format.
    But I already use 16khz with one channel. After some research i found that i
    have to use Big Endian encodage so i tried (SND_PCM_FORMAT_S16_BE) signed
    16bits Big endian but it still doesn't work...
    When i import in audacity the original record and mine, with the sames
    parameters everything seems ok...
    Thanks for you help

     
  • Nickolay V. Shmyrev

    Audio needs to be little endian. Not sure where you got the idea about the big
    endian.

     
  • Nickolay V. Shmyrev

    And of course it's always easier to share the audio than to talk about it. If
    you still have troubles, just upload audio to a public sharing resource and
    give a link here.

     
  • mehdi

    mehdi - 2011-04-12

    Yeaah! I've something now! It was because of the Big Endian!
    Now i've to improve my english accent to have better results ( i'm french ) :)
    Thanks a lot

     

Log in to post a comment.