wiki:JuliusResources
Last modified 13 years ago Last modified on 07/26/06 23:48:40

Julius Resources

Grammar Compilation Tips

NOISE word (Google translation)

Sometimes when a user is speaking utterances of a certain length they will, in many cases, pause their speech briefly to breath midway throught the utterance. With Julian, you can set your grammar to recognize such pauses where it is liklely they might appear. You can essentially do the recognition which considers this utterance pause.

The method of describing the pause position utterance with Julian is as follows. First, with the grammar file, between the words where pause might appear, insert the category name "NOISE". Furthermore, this ""NOISE" the silent word which corresponds is defined in the .voca file. The "Short Pause" silent word in the acoustic model (with the standard model which has been distributed here "sp") is the only word which is read.

The example with fruit is shown below. In this case, immediately after the "FRUIT_N" and before "PLEASE", the "NOISE" pause has been inserted.

# fruit.grammar (NOISE corresponding edition)
S       :  NS_B FRUIT_N NOISE PLEASE NS_E
# fruit name (+ quantity)
FRUIT_N :  FRUIT
FRUIT_N :  FRUIT NUM KO
# /Please do/Is
PLEASE  :  WO NOISE KUDASAI
PLEASE  :  NISHITE KUDASAI
PLEASE  :  DESU

With the voca file which corresponds to this, the next 2 lines are added lastly. The 1st column of sp word when silent is inserted, in the character string which is output, appointing whatever, is OK.

% NOISE <sp> sp

Actually when speech recognition is done, if there is no pause in the position which is in the midst of inputting , Julian will skip the tag. This way, rather than by the fact that word is appointed to NOISE the place where pause can appear, considering pause it can recognize softly. NOISE

Furthermore, default of name of the silent acoustic model which displays silent is 'sp'. The is the default used with the Obelisk acoustic model. If your acoustic model requires it to be set to something else, set it with the Julian "-spmodel" parameter.

Grammar Loops

If you want to use an infinite loop in part of your grammar, you should write a recursion rule like this (only left-recursion is allowed):

S: NS_B WORD_LOOP NS_E
WORD_LOOP: WORD_LOOP WORD
WORD_LOOP: WORD

Note: although this grammar syntax allows up to context-freeregular expression class, since Julian uses DFA parser. If you write a grammar whose class goes over the DFA class, the grammar compiler (as explained below) will reject it. class, Julian can handle only