1. A method for allocating memory in a speech recognition system comprising the steps of: acquiring a first set of data structures that contain a grammar, a word subgrammar, a phone subgrammar and a state subgrammar, each of the subgrammars related to the grammar; acquiring a speech signal; performing a probabilistic search using the speech signal as an input, and using the grammar and the subgrammars as possible inputs; and allocating memory for one of the subgrammars when a transition to that subgrammar is made during the probabilistic search.