What is RNN-T? Aligning speech frames and output tokens
The recurrent neural network transducer (RNN-T) combines a speech encoder with a prediction network that conditions on previous output tokens. Learn how blank labels, joint probabilities, forward-backward training, and beam search work, and what streaming latency depends on.
What is RNN-T? Aligning speech frames and output tokens
The recurrent neural network transducer (RNN-T) is an end-to-end probabilistic model that emits text tokens from speech frames. An encoder represents acoustic input, a prediction network uses the history of emitted tokens, and a joint network combines both representations to predict the next label. Training sums over multiple input-output alignments compatible with the reference token sequence, so frame-level token alignments do not need to be specified in advance.
Three networks and the blank label
An RNN-T has three parts:
**Encoder (transcription network):** turns acoustic frames into hidden representations.
**Prediction network:** uses previously emitted tokens to provide output-side context.
**Joint network:** combines the two representations and produces probabilities over vocabulary tokens and a blank label.
In the alignment lattice, blank advances through input time; a vocabulary token extends the output at the current input position. A frame and token therefore do not have a fixed one-to-one relationship, and multiple tokens can be emitted before time advances. Different alignment paths can yield the same reference output.
Training sums over alignments
Given acoustic input (x) and reference token sequence (y), the model is trained to increase (P(y|x)). Forward-backward dynamic programming sums the probabilities of alignments that produce the reference; the loss is commonly (-log P(y|x)). Considering these paths can be computationally and memory intensive. Implementations need efficient batching and kernels matched to sequence lengths, tokenization, and encoder frame rate.
Because RNN-T conditions on previous output tokens, it differs from CTC approaches that make frame outputs conditionally independent. This prediction context can provide strong internal linguistic information, so score balance matters when adding a decoder or external language model.
Decoding and streaming considerations
At inference, the model repeatedly scores blank and token choices; beam search usually keeps a shortlist of likely token sequences. Beam width, blank handling, token units (characters or subwords), length normalization, and an external language model can affect speed and errors. RNN-T can process input incrementally and is used for streaming, but actual latency depends on encoder look-ahead, chunk size, future context, beam search, and implementation. The name “RNN-T” alone does not guarantee real-time performance or low latency.
Evaluate final WER and insertion/deletion/substitution errors under the intended input conditions, along with latency, memory, and computation. Lower training loss does not automatically mean better recognition or faster streaming. Confirm that tokenization, blank index, input and target lengths, and loss-kernel conventions agree across the implementation.
References
[Graves, Sequence Transduction with Recurrent Neural Networks (2012)](https://arxiv.org/abs/1211.3711)
[Google Research, Joint Speech Recognition and Speaker Diarization via Sequence Transduction (2019)](https://research.google/blog/joint-speech-recognition-and-speaker-diarization-via-sequence-transduction/)
[Torchaudio, rnnt_loss documentation](https://docs.pytorch.org/audio/stable/generated/torchaudio.functional.rnnt_loss.html)