Pronunciation lexicons in ASR: add word pronunciations and handle unknowns
A pronunciation lexicon connects words to sequences of phones that a recognizer can search. Learn how to match its phone set to the acoustic model, add justified variants, handle out-of-vocabulary words, and validate changes with real audio.
Pronunciation lexicons in ASR: add word pronunciations and handle unknowns
A pronunciation lexicon in automatic speech recognition (ASR) maps words or recognition tokens to phone sequences that represent their pronunciations. Unlike a general dictionary of definitions, it supplies pronunciations used when searching for word candidates from speech. If its phone symbols do not match the acoustic model, or it omits real pronunciation variants, a word may be unavailable to decoding or confused with another even when it appears in the language model.
What does a lexicon contain?
A basic entry is “word + phone sequence.” For example, a Kaldi digits-recognition tutorial lists two separate entries for “zero”:
zero Z IH R OW
zero Z IY R OW
This illustrates that the same spelling can have more than one pronunciation. Kaldi documents formats with repeated entries for alternate pronunciations and formats that attach weights to them.
The phones in a lexicon must belong to the phone inventory defined for that recognizer and acoustic model; they are not arbitrary IPA strings. If the lexicon and model use different phone inventories, symbol compatibility must be resolved before the new entry can work. The same English word can have different phone sequences across dialects, stress patterns, or reduced speech. CMUdict is a widely used North American English resource, but its maintainers note that errors, omissions, and inconsistencies may remain. Do not treat an existing dictionary as ground truth for every speaker or domain.
A workflow for adding words and variants
| Step | Action | Check |
|---|---|---|
| 1. Define the vocabulary | Collect proper names, product names, technical terms, and the exact written forms expected in transcripts. | Match hyphens, capitalization, spacing, and number formatting to the recognizer’s vocabulary conventions. |
| 2. Write candidate pronunciations | Use the target language or dialect’s phone inventory and the existing lexicon format for one main pronunciation. | Do not map letters to sounds mechanically. Check the intended pronunciation and the acoustic model’s phone symbols. |
| 3. Add only justified variants | Add common variants only when supported by real recordings or reliable pronunciation evidence. | Too many unverified variants can increase competition among similar words. If the tool supports pronunciation weights, verify how it interprets them. |
| 4. Check the OOV path | Find what happens when a word is missing: an unknown token, or a grapheme-to-phoneme (G2P) process. | Treat G2P output as a candidate. Review names, abbreviations, and loanwords with speakers or real audio. An unknown token may not preserve the word’s identity. |
| 5. Run compatibility checks | Check format, duplicates, undefined phones, and symbol compatibility; rebuild language assets as required. | A Kaldi-based system may need its language directory and decoding graph rebuilt from the updated lexicon. Exact commands depend on the recipe and version. |
| 6. Evaluate on real audio | Compare before and after on held-out speakers and noise conditions containing the new words. | Check both recognition of the new words and false insertions of similar ordinary words. Improving one name does not guarantee a lower overall WER. |
Example: two pronunciations for “zero”
The tutorial’s example contains these two entries:
zero Z IH R OW
zero Z IY R OW
The pair shows how a lexicon can offer two phone sequences for one word to the decoder. It does not establish that both are equally common in every dialect or that the change improves recognition accuracy. Check recordings and the model’s phone inventory to confirm they fit your speakers and system.
If recognition does not change
If the new word still does not appear, first confirm that the intended transcript token exactly matches the lexicon entry. Then check that every new phone exists in the acoustic model’s symbol table and that the word is included in the language model or decoding vocabulary. If the system reuses a graph or lexicon cache, verify that the updated asset is actually used for decoding. If the word appears on unrelated audio, reduce unsupported variants or adjust their weights, then compare again on the same test set.
References
[Kaldi, Data preparation](https://kaldi-asr.org/doc/data_prep.html)
[Kaldi, Online decoding: changing the vocabulary](https://www.kaldi-asr.org/doc/online_decoding.html)
[CMU Sphinx, CMU Pronouncing Dictionary (CMUdict)](https://github.com/cmusphinx/cmudict)
[Kaldi for Dummies tutorial](https://kaldi-asr.org/doc/kaldi_for_dummies.html)