Julius: added a new feature

Julius has merged a pull request that adds a new feature “grammar search on the 1st pass”. To use it, get the latest code on master branch.

It enables applying full grammar on the 1-pass, thus outputs more reliable (grammar-constrained) result at the 1st pass.

Background The grammar-based recognition on Julius does not apply the full grammar on the 1st pass, but applies only the word-pair constraint extracted from the grammar for efficiency. The errors on the 1st pass caused by the loose constraint will be recovered on the final pass, so the approximation basically does not impact on the final result.

However, there are cases in which the 1st pass result should be more precise, typically on a real-time application that aims to utilize the partial recognition output before audio input ends)

Effect This update enables applying full grammar on the 1st pass. When enabled, the generated word hypotheses on the 1st pass will be examined by the grammar parser at every frame and only the words that is allowed to connect on the context will be expanded.

This feature is enabled when a recognition grammar (a set of .dfa and .dict files) has an additional dfa file (.dfa.forward). This also works on multiple grammar recognition.

No harm on old grammars, almost no impact on the recognition speed.

Usage Re-run the updated grammar converter mkdfa.pl (or mkdfa.py) of the latest commit to your recognition grammar. The output (.dfa, .dict) will be the same as the previous versions, but now it generates an extra file (*.dfa.forward). Run Julius with the generated grammar. It additionally reads .dfa.forward file if it exists, and enable the new feature. The (progressive) result always conforms the given grammar from the head. Restriction You can not yet give the .dfa.forward file when throwing a grammar via module mode. It is not implemented now.