Hello,
I am trying to use pocketsphinx to do ASR on long wav files. When pocketsphinx
gets to 2-3 seconds of silence, it stops processing. I am using
pocketsphinx_batch to do the processing. Another post said to use
pocketsphinx_continuous but I haven't found a way to pass a recording to
continuous. It works fine using a mic though.
Is there a way to either process a wav file with continuous or a way to tell
batch to not stop on silence?
Thanks
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This was very useful to read, thanks for posting. I sort of have the opposite
problem - I'm trying to get Pocketsphinx working on OS X but I can't get
pocketsphinx_continuous to get audio directly from mic input, so I was
wondering if I could get some pointers on how to modify the code above so that
it would work with a wav that is still being continuously recorded at the time
that utterance_loop() is called. i.e. basically faking mic input by routing a
continuously-recorded wav into utterance_loop. Or is there a better way to
accomplish my goal of analyzing an ongoing recording?
How I'm trying to do it so far is by having utterance_loop() recur every time
it receives an EOF from cont_ad_read(). This sort of works, but there are
issues: cont_ad_calib() always fails on the second loop, the whole sound file
gets re-examined from the beginning on each loop of utterance_loop(), and it
seems very resource-intensive. I don't know if nshmyrev is still monitoring
this topic but I'd be interested in hearing his or anyone else's thoughts on
smart approaches for analyzing an ongoing recording efficiently.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am trying to use pocketsphinx to do ASR on long wav files. When pocketsphinx
gets to 2-3 seconds of silence, it stops processing. I am using
pocketsphinx_batch to do the processing. Another post said to use
pocketsphinx_continuous but I haven't found a way to pass a recording to
continuous. It works fine using a mic though.
Is there a way to either process a wav file with continuous or a way to tell
batch to not stop on silence?
Thanks
Chris
/ -- c-basic-offset: 4; indent-tabs-mode: nil -- /
Thank you, worked perfectly.
Hello,
This was very useful to read, thanks for posting. I sort of have the opposite
problem - I'm trying to get Pocketsphinx working on OS X but I can't get
pocketsphinx_continuous to get audio directly from mic input, so I was
wondering if I could get some pointers on how to modify the code above so that
it would work with a wav that is still being continuously recorded at the time
that utterance_loop() is called. i.e. basically faking mic input by routing a
continuously-recorded wav into utterance_loop. Or is there a better way to
accomplish my goal of analyzing an ongoing recording?
How I'm trying to do it so far is by having utterance_loop() recur every time
it receives an EOF from cont_ad_read(). This sort of works, but there are
issues: cont_ad_calib() always fails on the second loop, the whole sound file
gets re-examined from the beginning on each loop of utterance_loop(), and it
seems very resource-intensive. I don't know if nshmyrev is still monitoring
this topic but I'd be interested in hearing his or anyone else's thoughts on
smart approaches for analyzing an ongoing recording efficiently.
It's probably better to put some more effort into this like to implement your
own ad device.
It makes sense to add little sleep here to wait while audio is being recorded.
Thank you nshmyrev, the sleep helped considerably with the cycle usage.