Redirect Output of Pocketsphinx_continuous to a file
3
votes
2
answers
6294
views
I have an ugly command:
pocketsphinx_continuous -samprate 48000 -nfft 2048 -hmm /usr/local/share/pocketsphinx/model/en-us/en-us -lm 9745.lm -dict 9745.dic -inmic yes
*Breakdown:* It listens for any noise and when it detects some, it listens to it, and then performs speech recognition on it.
Now, the command output has a bunch of junk in it, and one line that matters. Here is the output of one speech recognition:
READY....
Listening...
INFO: cmn_prior.c(131): cmn_prior_update: from
INFO: cmn_prior.c(149): cmn_prior_update: to
INFO: ngram_search_fwdtree.c(1553): 814 words recognized (9/fr)
INFO: ngram_search_fwdtree.c(1555): 60871 senones evaluated (684/fr)
INFO: ngram_search_fwdtree.c(1559): 37179 channels searched (417/fr), 6846 1st, 21428 last
INFO: ngram_search_fwdtree.c(1562): 1415 words for which last channels evaluated (15/fr)
INFO: ngram_search_fwdtree.c(1564): 2626 candidate words for entering last phone (29/fr)
INFO: ngram_search_fwdtree.c(1567): fwdtree 0.66 CPU 0.742 xRT
INFO: ngram_search_fwdtree.c(1570): fwdtree 3.36 wall 3.780 xRT
INFO: ngram_search_fwdflat.c(302): Utterance vocabulary contains 21 words
INFO: ngram_search_fwdflat.c(948): 655 words recognized (7/fr)
INFO: ngram_search_fwdflat.c(950): 40095 senones evaluated (451/fr)
INFO: ngram_search_fwdflat.c(952): 31447 channels searched (353/fr)
INFO: ngram_search_fwdflat.c(954): 1794 words searched (20/fr)
INFO: ngram_search_fwdflat.c(957): 1006 word transitions (11/fr)
INFO: ngram_search_fwdflat.c(960): fwdflat 0.29 CPU 0.326 xRT
INFO: ngram_search_fwdflat.c(963): fwdflat 0.30 wall 0.333 xRT
INFO: ngram_search.c(1253): lattice start node .0 end node .70
INFO: ngram_search.c(1279): Eliminated 1 nodes before end node
INFO: ngram_search.c(1384): Lattice has 127 nodes, 473 links
INFO: ps_lattice.c(1380): Bestpath score: -2298
INFO: ps_lattice.c(1384): Normalizer P(O) = alpha(:70:87) = -132973
INFO: ps_lattice.c(1441): Joint P(O,S) = -156371 P(S|O) = -23398
INFO: ngram_search.c(875): bestpath 0.01 CPU 0.011 xRT
INFO: ngram_search.c(878): bestpath 0.00 wall 0.005 xRT
HELLO
That
HELLO
is the only thing that matters, and I want that to be output into a file somehow.
I have already tried adding >foo.txt
to the end of the command, which works, except it outputs everything except for HELLO
to the file and HELLO
never even makes it to the command line.
I've tried adding &> foo.txt
2> foo.txt
>> foo.txt
and all of them cause the output to go where it says except every time it also causes READY....
,Listening...
, and HELLO
to disappear.
How can I direct HELLO
to a file, in any way, I don't care if other stuff comes with it, I can cut the other stuff out.
Asked by Patrick Cook
(251 rep)
Jan 3, 2016, 12:27 AM
Last activity: Jul 4, 2020, 06:36 PM
Last activity: Jul 4, 2020, 06:36 PM