Speech-enriched Memory for Inference-time Adaptation of ASR Models to Word Dictionaries

Ashish Mittal, Sunita Sarawagi, Preethi Jyothi, George Saon, Gakuto KurataEMNLP 2023

Abstract

Despite the impressive performance of ASR models on mainstream benchmarks, their performance on rare words is unsatisfactory. In enterprise settings, often a focused list of entities (such as locations, names, etc) are available which can be used to adapt the model to the terminology of specific domains. In this paper, we present a novel inference algorithm that improves the prediction of state-of-the-art ASR models using nearest-neighbor-based matching on an inference-time word list. We consider both the Transducer architecture that is useful in the streaming setting, and state-of-the-art encoder-decoder models such as Whisper.

In our approach, a list of rare entities is indexed in a memory by synthesizing speech for each entry, and then storing the internal acoustic and language model states obtained from the best possible alignment on the ASR model. The memory is organized as a trie which we harness to perform a stateful lookup during inference. A key property of our extension is that we prevent spurious matches by restricting to only word-level matches. In our experiments on publicly available datasets and private benchmarks, we show that our method is effective in significantly improving rare word recognition.

Introduction

Automatic Speech Recognition (ASR) models, including state-of-the-art systems like OpenAI’s Whisper, frequently struggle with "long-tail" vocabulary—proper nouns, technical jargon, or rare medical terms. For example, a medical chatbot might misinterpret the specific term "inpatient" as the more common phrase "in patient."

Existing solutions for this "contextual biasing" problem typically involve either training-time adaptation or shallow fusion. Training-time adaptation is computationally expensive and requires retraining for every dictionary update. Shallow fusion, while occurring at inference time, often leads to over-biasing, where the model "hallucinates" dictionary words even when they were not spoken, and introduces significant latency. PRISM (AdaPtation of ASR at Inference-time using Speech-enriched Memory) addresses these challenges as a plug-and-play, zero-retraining solution that is fast, accurate, and requires no changes to underlying model weights.

Methodology: The PRISM Framework

PRISM operates in two primary phases: memory creation and trie-based inference.

Memory Creation

Rather than indexing text alone, PRISM utilizes a Text-to-Speech (TTS) system to generate audio for every entry in a user-provided dictionary. This synthetic audio is processed by the ASR model to extract internal acoustic and language model states. These states are stored as "keys" in a memory bank, mapped to the corresponding text "values." This speech-enrichment allows the system to match incoming audio against representations the model natively understands, capturing phonetic nuances that text-only embeddings miss.

Overview of the PRISM architecture showing memory creation and inference.

Trie-Based Inference and Rescoring

To prevent spurious matches (e.g., incorrectly matching the prefix "In" from "Intuit" when only "In" was spoken), PRISM organizes the memory as a trie (prefix tree). During decoding, the system performs a k-Nearest Neighbor (k-NN) search using the current ASR state to find similar dictionary entries. The model's original prediction is dynamically blended with these k-NN results. If a match is strong, the bias weight increases; however, if the audio deviates from a dictionary word mid-way, a backoff mechanism reverts to the original model score to ensure precision.

The trie-based rescoring mechanism prevents over-biasing by tracking prefix matches and backing off when audio deviates.

Experimental Evaluation

The researchers evaluated PRISM across three distinct settings:

  • Librispeech: A standard benchmark using dictionaries of 1,000 rare words per utterance.
  • Enterprise Dataset: Real-world data from a medical chatbot featuring categories like drug names and medical procedures.
  • Entity-rich Dataset: A new synthetic benchmark containing dense entities (locations, names, drugs), released to the research community.

Key Results

  • Significant Error Reduction: PRISM achieved up to a 36% relative reduction in Entity Word Error Rate (E-WER) on Librispeech.
  • Domain Success: In a challenging medical dataset category, the baseline Transducer model's E-WER of 83.3% was slashed to 8.3%.
  • Efficiency: The Real-Time Factor (RTF) increased only slightly, confirming the system's suitability for real-time applications even with large dictionaries.

Conclusion and Future Work

PRISM demonstrates that speech-enriched memory is a powerful tool for adapting ASR models to rare vocabulary without retraining. While highly effective, the approach's performance is tied to the quality of the TTS engine and may face challenges with highly accented speech or extreme background noise. Future research will explore scaling to millions of entries through advanced indexing and quantization techniques.

Summary updated

BibTeX
@inproceedings{mittal2023speech,
  author = {Ashish Mittal and Sunita Sarawagi and Preethi Jyothi and George Saon and Gakuto Kurata},
  title = {{Speech-enriched Memory for Inference-time Adaptation of ASR Models to Word Dictionaries}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=3pvdo2yHXq},
}
Figure