One or more non-transitory computer-readable media storing instructions that, when executed by one or more computers, cause the one or more computers to perform operations comprising:
- obtaining context data for an utterance, the context data indicating (i) a linguistic context that includes one or more words preceding the utterance, and (ii) a non-linguistic context;
- selecting, from among multiple domain-specific model components of a language model that have been respectively trained for different groups of features, a subset of the domain-specific model components to use in recognizing the utterance, the subset of the domain-specific model components being selected based on the non-linguistic context of the utterance, wherein each of the domain-specific model components corresponds to a different aspect of non-linguistic context, wherein the domain-specific model components comprise different sets of n-gram features for n-grams, and wherein each of the domain-specific model components has corresponding weights for its n-gram features trained based on language examples from multiple users that occur in the aspect of non-linguistic context corresponding to the domain-specific model component;
- generating a score for a candidate transcription for the utterance using the language model, the score being generated using (i) the selected subset of the domain-specific model components, and (ii) a baseline model component of the language model that is domain-independent and includes corresponding weights for a respective set of features, wherein the score is generated without using the domain-specific model components that were not selected;
- determining a transcription for the utterance using the score;
- and
- providing the transcription as output of an automated speech recognition system,
- wherein the language model comprising the baseline model component and the multiple domain-specific model components is trained by, for each of a plurality of training language examples each labeled as occurring in one or more particular aspects of non-linguistic context:
- triggering, for use in training the language model on the corresponding training language example in unison with the baseline model component, one or more of the domain-specific model components that correspond to at least one of the one or more particular aspects of non-linguistic context that the corresponding training language example is labeled as occurring in;
- generating, as output from the language model, using both the corresponding weights of the baseline model component and the weights of the one or more triggered domain-specific model components, a language model score;
- and
- updating, using the language model score output from the language model, the weights of the one or more triggered domain-specific model components without updating the corresponding weights of the baseline model component.