Craig_P
Craig_P

Reputation: 37

Save text output from Julius

I am running Julius speech recognition on Windows 10 and would like to save a text output of only whatever is said to a text file, i.e., the value of the "sentence 1 line" marked below. I've searched through the documentation and online but haven't found any way to do this. Ideally, the file will be rewritten or appended to each time a new input is received via the microphone. If more information is supplied in the text file, I can run a search on it for what I need so that would be fine, but I can't figure out if there is a way to actually write to a text file.

pass1_best:   よ ござい ます
pass1_best_wordseq: <sil> あ+ア+感動詞 よ+ヨ+助詞 ござい+ゴザイ+動詞 ます+マス+助動詞     <sil>
pass1_best_phonemeseq: sp_S | a_S | y_B o_E | g_B o_I z_I a_I i_E | m_B a_I s_I u_E | sp_S
pass1_best_score: 119.575493
### Recognition: 2nd pass (RL heuristic best-first)
STAT: 00 _default: 3022 generated, 1276 pushed, 61 nodes popped in 187
**sentence1:  お はよう ござい ます**
wseq1: <sil> お+オ+接頭辞 はよう+ハヨー+形容詞 ござい+ゴザイ+動詞 ます+マス+助動詞 <sil>
phseq1: sp_S | o_S | h_B a_I y_I o:_E | g_B o_I z_I a_I i_E | m_B a_I s_I u_E | sp_S
cmscore1: 0.312 0.979 0.504 0.975 0.827 1.000
score1: 219.152496
Stat: wav2mfcc-pipe: cepstral mean and variance written to "text.txt"

Upvotes: 0

Views: 740

Answers (1)

Colin Beckingham
Colin Beckingham

Reputation: 525

You have a couple of options: if you are using Julius directly, that is starting an instance of julius and interacting directly then you can play with the option

-logfile julius.log         # redirect logs to file 

or simply pipe the output which normally comes to standard output to a file as in

julius -C my.jconf | saveloghere.log

A more interesting possibility is to run Julius in module mode, as a socket server (see option -module # start in module mode). Then the output comes back as XML and you can use an XML parser to get the information you need.

Upvotes: 0

Related Questions