17. A computer-implemented method comprising: receiving audio data and a textual transcript of the audio data to be aligned with the audio data; generating, from the textual transcript, a language model that represents a set of particular substrings of the textual transcript, the language model comprising allowed states of the language model and one or more transitions that link the allowed states; generating a speech hypothesis of one or more language elements included in the audio using a speech recognizer, wherein the speech hypothesis includes time stamps associated with an occurrence of each of the one or more language elements; comparing the one or more language elements of the speech hypothesis to the substrings generated by the language model the language model to identify times at which particular ones of the substrings occur in the audio data; and associating at least a portion of the textual transcript with the time stamps based on the comparison.
17. A computer-implemented method comprising: receiving audio data and a textual transcript of the audio data to be aligned with the audio data; generating, from the textual transcript, a language model that represents a set of particular substrings of the textual transcript, the language model comprising allowed states of the language model and one or more transitions that link the allowed states; generating a speech hypothesis of one or more language elements included in the audio using a speech recognizer, wherein the speech hypothesis includes time stamps associated with an occurrence of each of the one or more language elements; comparing the one or more language elements of the speech hypothesis to the substrings generated by the language model the language model to identify times at which particular ones of the substrings occur in the audio data; and associating at least a portion of the textual transcript with the time stamps based on the comparison. 19. The method of claim 17 , wherein the received audio data is based on television broadcasts, online videos, audio books, or music.