Menu

detect silence in raw file?

Help
wesamoth
2011-07-13
2012-09-22
  • wesamoth

    wesamoth - 2011-07-13

    Hi,

    I am currently using pocketsphinx to do speech recognition with a robot.
    I receive a data flow containing 1 chanel PCM sound (16kHz), and I am able to
    record this sound and decode it in batch mode with ps_decode_raw.
    But, as it is a streamed sound, I would like to decode it in real time, and
    therefore detect silences...

    Is it possible to do such a thing? if so, how?

    Thanks in advance for your answers.

     
  • Nickolay V. Shmyrev

    For example of continuous decoding check
    pocketsphinx/src/programs/continuous.c. Corresponding tool
    pocketsphinx_continuous decodes stream from the microphone or from a file
    configured with -infile option.

     
  • wesamoth

    wesamoth - 2011-07-18

    You will tell me if I am wrong, but the "infile" option is only available
    since 0.7? I should use VS2008 for compatibility reasons, so I can only use
    0.6...

    However, I will take a look at these functions, just to see if I can adapt it.

     
  • wesamoth

    wesamoth - 2011-07-18

    Thanks!
    I just integrated and adapted "ad_file_read" and "recognize_from_file"
    functions from the 0.7 version and it works great now!
    bonus question: Is there a way to avoid writting into a file and decode
    silence directly from a buffer?

     
  • Nickolay V. Shmyrev

    Is there a way to avoid writting into a file and decode silence directly
    from a buffer?

    You can use sphinxbase AD API to decode from buffers too. It's not different
    from reading from a file.

     
  • wesamoth

    wesamoth - 2011-07-28

    Perfect! I had some problems adapting all that stuff but in the end, it works
    perfectly.

    Thanks for your answers!

     

Log in to post a comment.