Click here to register.

Step 1 - Task Grammar

Create a new folder in your home directory and call it 'voxforge'.  Create another directory within this folder and call it 'auto'.

Create a file called sample.grammar in your 'voxforge/auto' folder, and add the following:
S : NS_B SENT NS_E
SENT: CALL_V NAME_N
SENT: DIAL_V DIGIT

Still in your 'voxforge/auto' folder, create a file called sample.voca, and add the following:

% NS_B
<s>        sil

% NS_E
</s>        sil

% CALL_V
PHONE        f ow n
CALL        k ao l

% DIAL_V
DIAL        d ay l

% NAME_N
STEVE        s t iy v
YOUNG        y ah ng

% DIGIT
FIVE        f ay v
FOUR        f ow r
NINE        n ay n
EIGHT        ey t
OH        ow
ONE        w ah n
SEVEN        s eh v ih n
SIX        s ih k s
THREE        th r iy
TWO        t uw
ZERO        z iy r ow

For details on the file formats, see Step 1 - Task Grammar, in the Tutorial.

Converting to Julian format

Compile your files (sample.grammar and sample.voca) with the mkdfa.pl script as follows:

(note you only need to execute the "cd" command if you are not already in the "auto" directory)

$ cd voxforge/auto      

$ mkdfa.pl sample
sample.grammar has 3 rules
sample.voca    has 6 categories and 18 words
---
Now parsing grammar file
Now modifying grammar to minimize states[-1]
Now parsing vocabulary file
Now making nondeterministic finite automaton[6/6]
Now making deterministic finite automaton[6/6]
Now making triplet list[6/6]
---
generated: sample.dfa sample.term sample.dict

   
This creates 3 files:

sample.dfasample.dfa;sample.termsample.term; and sample.dictsample.dict.


Comments

Click the 'Add' link to add a comment to this page; click the 'Read More' link to view replies to a posted comment.

AddSearch

problem during converting to juliun
By aspirant - 8/22/2010

i did the same as given in the instructions of converting to juliun.

i have also changed the drive to home/voxforge/auto

but on running mkdfa.pl

its giving an error:-

$ mkdfa.pl sample
cannot open "sample.grammar" at /cygdrive/c/Cygwin/Julius/julius-3.5.2-multipath
-win32bin/bin/mkdfa.pl line 66.

mkdfa
By LGL - 4/19/2010

Try to use http://www.repository.voxforge1.org/downloads/software/julius-3.5.2-multipath-win32bin.zip

Error after reading rules and categories
By kpap - 3/3/2010 - 1 Replies

I'm running the mkdfa.pl script from the same folder I've already put sample.grammar and sample.voca files. My OS is Windows 7.  I got the following error :

-----------

$ mkdfa.pl sample
sample.grammar has 1 rules
sample.voca    has 2 categories and 10 words
---
Error:       Can't open grammar file "/tmp/g4132.grammar"
Error:       Can't open grammar file "/tmp/g4132.grammar"
Error:       Can't open grammar file "/tmp/g4132.grammar"
Error:       Can't open grammar file "/tmp/g4132.grammar"
Error:       Can't open grammar file "/tmp/g4132.grammar"
Error:       Can't open grammar file "/tmp/g4132.grammar"
---
no .dfa or .dict file generated

---------

Any ideas ??

 

 

File Error
By Amit Surana - 4/3/2009

I know its way too late reply for above question. But someday someone might find it useful.

when you run the perl script make sure you are in same folder as in sample.grammar and sample.voca

I too got the same erorr before !!!

:)

error when converting to Julian format
By ethan oconnors - 6/6/2008 - 3 Replies

When I try to convert to the Julian format I put in

mkdfa.pl sample 

and get this message

cannot open "sample.grammar" at /Julius/bin/mkdfa.pl line 66.

What am I doing wrong? HELP!!! 

Step 1, Lexical Error
By royerfa - 2/22/2008 - 1 Replies

Hello,

 

I am new in VoxForge. I try to follow the Tuto, and I have a Lexical error step 1.

In fact this is my problem.

    royerfa@royerfa-laptop:~/voxforge/auto$ mkdfa.pl sample
    sample.grammar has 3 rules
    sample.voca    has 6 categories and 18 words
    ---
    Now parsing grammar file
    "rror:       Lexical mistake "
    Error: cannot open "sample.dfa.tmp"
    ---
    no .dfa or .dict file generated

 

And I am surprise because with the example from http://julius.sourceforge.jp/en/grammar.html

It Works without problem.

Do you have any sugggestion for me .Foot in mouth