Performance¶
Certain factors can impact the time it takes to compile a grammar, and you must be aware of them when compiling grammars during a recognition session.
As a rule, the larger the grammar, the longer it takes to be compiled. Therefore, if the grammar contains long lists of city names or the people’s names, it will very likely take a longer time to compile. Since grammars are always optimized for performance while recognition is underway, grammars containing complex repetition patterns or multiple choices tend to take a longer time to be compiled, when compared to more “direct” grammars. Compilation can also be slowed down when a very large user lexicon is used.
For large or complex grammars that take a long time to be compiled, the recommendation is that they be precompiled. If a very large lexicon is used, we recommend using binary lexicons.
When it comes to recognition performance, as a rule, the larger the grammar, the longer it will take to process the input sentences. Recognition performance is also affected by aspects unrelated to the grammar, such as the quality and length of the audio, but such factors are beyond the scope of this guide.