Speech Recognition Engines

Flat
Re: Compiling Julian source under Windows XP
User: Marcin Fedyna
Date: 12/11/2007 5:41 pm
Views: 461
Rating: 76

Hi Ken.

I finally managed to compile Julian. I did it on my friend`s computer, I suppose there were some issues with Cygwin on my PC. The new compiled Julian is few bytes larger than the precompiled binary available at the Julian site. Strange.

There is another problem. I`m writing a Java application that displays in a window the full stream that Julian writes on windows console (cmd) . The problem is that when I used precompiled binary of Julian ( downloaded from Julius/Julian site) it worked but with display issues ( no "please speek" sentence displayed at the java window). I figured out that it needs some more fflush instructions in the source code to make it work smoothly and display full stream from the console. That`s why i wanted to compile Julian from source.

I did this before with HVite from HTK and it run flawless under Java application.

Now my new compiled Julian ( without the fflush instructions, original code) does not work when I switch it with precompiled binary of Julian I had before. It simply does not display anything :(

Whereas when I run this new compiled Julian from windows cmd it works fine. What may be the cause of it? Could it be the POSIX? I tried to turn off the POSIX but was unsuccesful in that.

I would be grateful for any hints or suggestions, what may be wrong.

Thanks again for help Ken.

Regards

Marcin

--- (Edited on 12/11/2007 5:41 pm [GMT-0600] by Visitor) ---

Re: Compiling Julian source under Windows XP
User: kmaclean
Date: 12/11/2007 9:21 pm
Views: 473
Rating: 21

Hi Marcin,

>The problem is that when I used precompiled binary of Julian ( downloaded

>from Julius/Julian site) it worked but with display issues ( no "please speek"

>sentence displayed at the java window)

I think the problem is that Julian uses both STDOUT and STDERR for its output.  Try executing the precompiled Julian binary from your Java program using something like this:

julian -input mic -C julian.jconf 2>&1 

The "2>&1" notation tells your system to direct your STDERR to STDOUT.

>Now my new compiled Julian ( without the fflush instructions, original code)

>does not work when I switch it with precompiled binary of Julian I had

>before. It simply does not display anything :(

Try executing this perl program on both your precompiled Julian and your new compiled Julian:

#!/usr/bin/perl -w
#open pipe to Julian
open(FILEHANDLE,"julian -input mic -C julian.jconf 2>&1 | ");
while (<FILEHANDLE>) {
    print "test" . $_;
}
close FILEHANDLE;

what does it display (if anything...?).  If everything is working OK, you should have the word "test" appended at the beginning of all your Julian output. 

>Whereas when I run this new compiled Julian from windows cmd it works

>fine. What may be the cause of it? Could it be the POSIX? I tried to turn off

>the POSIX but was unsuccesful in that.

I don't know enough about the POSIX standard to say one way or another ...  If your Java program can capture output from a program's STDOUT filehandle it should work (if your new Julian works OK from the command line).

Another option might be to use Julian in server mode - rather than trying to get Julian output from the command line.  adintool is the audio client that sends the audio to the Julian server, and you use jcontrol to send commands and obtain results from the Julian server.  Therefore you would need your Java program to replicate what jcontrol does (or monitor jcontrol output) rather than trying to monitor Julian directly.

Hope this helps,

Ken 

--- (Edited on 12/11/2007 10:21 pm [GMT-0500] by kmaclean) ---

Re: Compiling Julian source under Windows XP
User: Marcin Fedyna
Date: 1/22/2008 4:51 pm
Views: 226
Rating: 19

Ken I tried the command 2>&1 while running Julian (original unaltered binary) from my Java application. It does not display anything, just like the Julian freezes. Maybe it needs some fflush instructions?

Another interesting fact is that when i run Julian via my Java application ( again original Julian binary) it performs recognition only 31 times and not one more time! This is very strange! Under windows CMD the same Julian binary works all the time. What may be the cause of those exact 31 recognitions? How to overcome this snag?

Thanks again for any help.

Regards

Marcin

--- (Edited on 1/22/2008 4:51 pm [GMT-0600] by Visitor) ---

Re: Compiling Julian source under Windows XP
User: kmaclean
Date: 1/22/2008 5:30 pm
Views: 275
Rating: 29

>Ken I tried the command 2>&1 while running Julian (original unaltered binary)

>from my Java application. It does not display anything, just like the Julian

>freezes. Maybe it needs some fflush instructions?

Does short Perl program I wrote work for you?  If it does, I would guess that the problem lies somewhere in your Java program.

Ken 

--- (Edited on 1/22/2008 6:30 pm [GMT-0500] by kmaclean) ---

Re: Compiling Julian source under Windows XP
User: Marcin Fedyna
Date: 2/27/2008 2:28 pm
Views: 258
Rating: 15

Hello Ken.

It took me a while to figure what was the problem. You were right it was Java process buffer. It was too small. Julian now recognizes indefinitely under my application.

Thank you again for all your help. I really appreciate it.

I also have one quick question about *.dfa file (a converted HTK`s lattice to Julian format) Here is a structure of my .dfa when I view it in notepad:

0 0 8 0 0
2 1 1 0 0
3 2 2 0 0
4 3 2 0 0
5 4 2 0 0
6 5 2 0 0
7 6 2 0 0
8 7 3 0 0
8 8 5 0 0
8 9 7 0 0
8 10 6 0 0
8 11 4 0 0
1 -1 -1 1 0

My question is: what to those digits mean? When I view HTK lattice it is understandable but I would like to know how to understand the Julian converted version of lattice.

Thanks for all your help.

Best regards

Marcin

--- (Edited on 2/27/2008 2:28 pm [GMT-0600] by Visitor) ---

Re: Compiling Julian source under Windows XP
User: kmaclean
Date: 2/29/2008 11:32 am
Views: 379
Rating: 20

Hi Marcin,

Sorry, I never really got into the details of a dfa file's structure.  You might take a look at the source for mkdfa.pl and figure it out from there.

Ken 

--- (Edited on 2/29/2008 12:32 pm [GMT-0500] by kmaclean) ---

Re: Compiling Julian source under Windows XP
User: jeffersoncarvalho
Date: 7/23/2008 7:04 am
Views: 73
Rating: 8

Hi Marcin,

 

I am working in a java application that uses julius and voxforge for voice recognition. Our application works this way:

 We first record and save an audio file with our Java application. Second, we use this audio file as a parameter to julius command line application. The problem is that we do not want to use file manipulation anymore, because of its overhead.

 I wonder how did you do this task under your application. Does your Java program "talks" directly with Julius? Did you create any bridge between Java and Perl? Well, I appreciate any help.

 

Thanks,

 

Jefferson Carvalho

 

 

--- (Edited on 7/23/2008 7:04 am [GMT-0500] by jeffersoncarvalho) ---

Re: Compiling Julian source under Windows XP
User: kmaclean
Date: 7/23/2008 3:07 pm
Views: 76
Rating: 4

Hi Jefferson,

> I wonder how did you do this task under your application.

One way would be to run Julius/Julian (note that newest version of Julius no longer has Julian - it is integrated in Julius) in server mode, have a client that captures the audio and sends it to Julius (similar to what adintool does) to a defined port, and create a Java API that replicates what jcontrol does in monitoring the Julius server and capturing recognition results.

There are examples in the docs, but the process would look something like this.

(1) start Julius / Julian in server mode (module mode) at host 'localhost'.

           $julian -C xxx.jconf ... -input adinet -adport 5530 -module 10500

(2) (on another host) start jcontrol, and start communication.

          $ jcontrol localhost 10500
           connecting to host:10500...done
           > <GRAMINFO>
           >  # 0: [active] 99words, 42categories, 135nodes (new)
           > </GRAMINFO>
           > <GRAMINFO>
           >  # 0: [active] 99words, 42categories, 135 nodes
           >   Grobal:      99words, 42categories, 135nodes
           > </GRAMINFO>
           > <INPUT STATUS="LISTEN" TIME="1031583083"/>
        -> pause
        -> resume
           > <INPUT STATUS="LISTEN" TIME="1031583386"/>
        -> addgram test
           .... 

 (3) start adintool client (or create your own that does the same thing) and connect to Julius/Julian server

 $ adintool-in mic -out adinnet -port 5530

Ken

--- (Edited on 7/23/2008 4:07 pm [GMT-0400] by kmaclean) ---

Re: Compiling Julian source under Windows XP
User: jeffersoncarvalho
Date: 7/24/2008 12:19 pm
Views: 58
Rating: 4

Hi Ken,

Your example worked fine, with some sintax corrections. I used adintool as a client but you said that I could create my own client in Java. I don't know if I am asking to much from you but could you please send me your Java code for such connection, or copy paste here a piece of code?

 

Thank you very much.

--- (Edited on 7/24/2008 12:19 pm [GMT-0500] by jeffersoncarvalho) ---

Re: Compiling Julian source under Windows XP
User: kmaclean
Date: 7/24/2008 12:41 pm
Views: 427
Rating: 5

Hi jefferson,

>please send me your Java code for such connection

Sorry, I don't have any such code... 

If you don't want to create your own adintool functionality in Java, you might try using JNI (Java Native Interface) and essentially create a Java wrapper around adintool.

In addition, the Java Sound Resources page has an answering machine example you might be able to modify to send audio back the the Julius server in "adinnet" format.

Hope that helps,

Ken

 

--- (Edited on 7/24/2008 1:41 pm [GMT-0400] by kmaclean) ---

PreviousNext