Error: Can't open grammar file "/tmp/g8732.grammar"
User: jonathanalis
Date: 3/20/2015 1:00 am
Views: 3134
Rating: 1

I got a problem when running sample. Im running on ~/voxforge/manual, the sample.grammar and sample.voca are ok (already with linux terminations). Here what i got:


jonathan@Jonathan ~/voxforge/manual

$ sample

sample.grammar has 3 rules

sample.voca    has 6 categories and 18 words


Error:       Can't open grammar file "/tmp/g9248.grammar"

Error: cannot open "sample.dfa.tmp"


no .dfa or .dict file generated

Well, seems to be on line:
$status = system("$mkfabin -e1 -fg $rgramfile -fv $tmpvocafile -fo ${dfafile}.tmp -fh ${tmpprefix}.h");
That is, this is calling mfka in this way(after tracking var names):
/Julius/bin/mkfa -e1 -fg /tmp/g9248.grammar -fv /tmp/g9248.voca -fo sample.dfa.tmp -fh /tmp/g9248.h
I just cant figure out whats happening, and what i have to do to fix it.
Re: Error: Can't open grammar file "/tmp/g8732.grammar"
User: kmaclean
Date: 6/12/2015 12:28 pm
Views: 22
Rating: 1

>Error:  Can't open grammar file "/tmp/g8732.grammar"

This is a bug in script that occurs when you run the Windows build of Julius in Cygwin.

You not longer have to run Julius or its grammar scripts in Cygwin.  You can run Julius directly from the Windows terminal (i.e. Command Prompt).

With your favourite editor edit the script (in c:\cygwin\home\homedirectory\voxforge\bin\julius-4.*.*-win32bin\julius-4.*.*-win32bin\bin) by searching for each occurrence of 'cygdrive;' and replacing it with 'cygdrive|cygwin':

line 144 and 151:

if ($tmpprefix =~ /cygdrive/) {


if ($tmpprefix =~ /cygdrive|cygwin/) {