Search code examples
cmusphinxpocketsphinx

Getting keyword times from pocketsphinx without logs


I'm trying to use pocketsphinx for some keyword recognition. I'm able to use pocketsphinx_continuous -infile -keyphrase and pocketsphinx_continuous -infile -kws successfully. The output seems quite verbose and I'm unable to find a guide or a parser on the internet. My output requirement is to just get the time stamps at which the keyword was recognised. How can I do this?


Solution

  • The command to just print the times:

      pocketsphinx_continuous -infile file.wav -keyphrase "hello world" \
          -logfn /dev/null -time yes
    

    -logfn option suppress logs, -time option enables printing the times. Times are in seconds.