julius icon indicating copy to clipboard operation
julius copied to clipboard

How to run julius with only text as output?

Open newgithubuser1234 opened this issue 6 years ago • 8 comments

Hello. Is there a way to run julius with an option, which actually would make it print just best sentence as an output? I run julius with that command: "julius -C julius.jconf -dnnconf dnn.jconf -input mic" and what I get is

Recognition: 2nd pass (RL heuristic best-first) STAT: 00 _default: 14715 generated, 4565 pushed, 339 nodes popped in 175 ALIGN: === word alignment begin === sentence1: PTAK wseq1: PTAK phseq1: sil | p t a k | sil cmscore1: 0.683 0.072 1.000 score1: 65.000496 === begin forced alignment === -- word alignment -- id: from to confidence unit

[ 24676 24676] 0.682506 [] [ 24677 24765] 0.072064 PTAK [PTAK] [ 24766 24847] 1.000000 [] current base = 24676re-computed AM score: 142.784332 === end forced alignment ===

In this example, I wish to get just "PTAK". I need that, because I want to send sentence to other program, which is supposed to print me what I got. I don't know much about speech recognition and I am not really pro at programming stuff.

Second question is: is there a possibility to turn off Julius automatically after it sends me first sentence? I read a lot about it last days, since I couldn't find anything for polish converting speech to text on linux offline. I would really appreciate answer, which would solve my problems.

Third question: are there some options, which would convert single word without context better?

newgithubuser1234 avatar Feb 16 '19 23:02 newgithubuser1234

First question: option -quiet turns off almost all output and just outputs the result. See Options document for details.

Second question: Using adintool audio front end and use -autopause option for the adintool will do the job:

Term 1:
% adintool -in mic -out adinnet -autopause
Term 2:
% julius -C ... -input adinnet

The adintool will stop just after sending the first input to Julius. Note that the paused adintool should be resumed from Julius via socket contol. Test the resume using module mode like this:

Term 1:
% adintool -in mic -out adinnet -autopause
Term 2:
% julius -C ... -input adinnet -module
Term 3:
% jclient.py
(after pause, type below and hit enter to resume audio input)
RESUME

LeeAkinobu avatar May 25 '19 06:05 LeeAkinobu

hello, I tried running julius with -quiet as /home/zeus/gitRepoClones/julius/julius/julius -C julius.jconf -dnnconf dnn.jconf -quiet but it still prints everything. Any solutions to this

kumar-nilesh-101 avatar Jun 27 '19 06:06 kumar-nilesh-101

Did you investigate whether the position of the -quiet in the command is important? Normally one would expect to see global options immediately after the call to julius, that is before the -C and -dnnconf pairs?

colbec avatar Jun 27 '19 07:06 colbec

I tried it but no improvements

kumar-nilesh-101 avatar Jun 27 '19 07:06 kumar-nilesh-101

Well, after playing around with it for a while, it seems to me that this tool is completely useless for any particular application except for academic and research purposes.

You could at least output recognized words in an XML or JSON format for developers to be able to use it.

AgentCoop avatar May 13 '20 10:05 AgentCoop

I think this is quite offensive to the effort of the creator - Mr Lee. In my opinion this is the best decoder available out there. It has been used extensively in commercial environments. Just because you do not make the effort of spending time with it does not make it useless.

palles77 avatar May 13 '20 12:05 palles77

@LivingScripts A little contribution of mine. After having redirected the output to a text file, say "speech.txt", you can use the attached script I have written in python language to filter most of the verbose text and generate a new file, for example "extract.txt", containing only the words of your interest. Obviously, you must have python installed, then you have to copy the script to the same directory where "speech.txt" (or whatever name you have chosen) is, change the script extension from .txt to .py, inside the script modify the input and output file names at your own discretion, launch it with command python extract_words.py. It's very fast. extract_words.txt

zdomjus60 avatar May 18 '20 07:05 zdomjus60

I've switched to vosk. It works much better. https://github.com/MikeyBeez/Juliet

MikeyBeez avatar May 18 '20 16:05 MikeyBeez