When a speech recognizer chooses only the most likely next word, an early mistake can rule out a better transcript. Beam search keeps a shortlist of promising partial transcripts, extending and rescoring them as new audio arrives. In Deep Speech 2, scores combined an acoustic model with a language model that favored plausible words and phrases. section 4.4.3
The decoding trade-off is practical:
- Greedy decoding is fast but commits to one option at each step; beam search preserves alternatives and selects the highest-scoring complete sentence. section 4.4.3
- Heuristic pruning discards candidates far behind the leaders. Deep Speech 2 retained up to 500 English or 200 Mandarin partial transcripts per expansion, limiting costly searches through unlikely candidates. section 4.4.3
Why prune?
For Mandarin, many characters share a sound, enlarging the search space. Pruning keeps the leading transcript candidates in play without exploring every possibility. section 4.4.3




