Improving Mandarin End-to-End Speech Recognition with Word N-gram Language Model

Jinchuan Tian, Jianwei Yu, Chao Weng, Yuexian Zou, Dong Yu · DOI

Abstract

Despite the rapid progress of end-to-end (E2E) automatic speech recognition (ASR), it has been shown that incorporating external language models (LMs) into the decoding can further improve the recognition performance of E2E ASR systems. To align with the modeling units adopted in E2E ASR systems, subword-level (e.g., characters, BPE) LMs are usually used to cooperate with current E2E ASR systems. However, the use of subword-level LMs will ignore the word-level information, which may limit the strength of the external LMs in E2E ASR. Although several methods have been proposed to incorporate word-level external LMs in E2E ASR, these methods are mainly designed for languages with clear word boundaries such as English and cannot be directly applied to languages like Mandarin, in which each character sequence can have multiple corresponding word sequences. To this end, we propose a novel decoding algorithm where a word-level lattice is constructed on-the-fly to consider all possible word sequences for each partial hypothesis. Then, the LM score of the hypothesis is obtained by intersecting the generated lattice with an external word N-gram LM. The proposed method is examined on both Attention-based Encoder-Decoder (AED) and Neural Transducer (NT) frameworks. Experiments suggest that our method consistently outperforms subword-level LMs, including N-gram LM and neural network LM. We achieve state-of-the-art results on both Aishell-1 (CER 4.18%) and Aishell-2 (CER 5.06%) datasets and reduce CER by 14.8% relatively on a 21K-hour Mandarin dataset.

Introduction

End-to-end (E2E) automatic speech recognition (ASR) has revolutionized the field, but these models often struggle to capture the deep linguistic patterns found in massive text-only datasets. To address this, researchers commonly employ "shallow fusion," where an external language model (LM) guides the ASR system during decoding.

In languages like English, this integration is straightforward due to explicit word boundaries. However, Mandarin lacks such boundaries; a sequence of characters can often be segmented into words in multiple valid ways. Consequently, most Mandarin E2E systems rely on character-level or subword-level LMs. This approach misses rich semantic and syntactic information inherent at the word level, limiting overall accuracy.

Proposed Method: On-the-fly Lattice Construction

The researchers propose a novel decoding algorithm that integrates word-level N-gram LMs without requiring pre-defined word boundaries. The core innovation is the on-the-fly construction of a word lattice for each partial hypothesis generated by the ASR system.

Figure 1: On-the-fly word lattice construction for the character sequence '孙悟空' (Sun Wukong).

As shown in Figure 1, the algorithm builds a lattice representing all possible segmentations of a character string into words based on a known vocabulary. This lattice is represented as a Weighted Finite-State Acceptor (WFSA). The algorithm then intersects this lattice with the external word N-gram LM (also a WFSA) to score every possible segmentation path. The final LM score is derived using either the Tropical semiring (best-scoring path) or the Log-semiring (sum of all paths).

Experimental Setup

The method was evaluated on three scales:

  • Aishell-1: 178 hours of open-source Mandarin speech.
  • Aishell-2: 1,000 hours of open-source Mandarin speech.
  • Large-scale Internal Dataset: A 21,000-hour corpus covering six real-world scenarios: reading, translation, guild, television, music, and education.

The approach was tested across two major E2E architectures: Attention-based Encoder-Decoder (AED) and Neural Transducer (NT).

Key Results and Analysis

The proposed word N-gram LM consistently outperformed character-level baselines across various configurations.

Figure 2: Detailed performance comparison of AED and NT systems on Aishell-1 and Aishell-2 datasets.

As detailed in Figure 2, the researchers achieved state-of-the-art results with a Character Error Rate (CER) of 4.18% on Aishell-1 and 5.06% on Aishell-2. Key insights include:

  • Superiority of Word-Level Information: Word-level LMs outperformed character-level N-grams and even character-level Neural Network LMs (NNLMs).
  • Robustness: The method showed greater stability across different LM weights compared to baselines.
  • Large-scale Gains: On the 21k-hour dataset, the method achieved a 14.8% relative CER reduction in the "reading" scenario.

Limitations and Future Work

While highly effective, the method introduces computational overhead, particularly for Neural Transducer (NT) systems. The Real-Time Factor (RTF) for NT systems was significantly higher (e.g., 4.48 vs. 0.50 for the baseline) because these models evaluate hypotheses for every audio frame and possible word length. Future work will focus on accelerating the method for NT systems and exploring the integration of word-level neural LMs within this lattice-based framework.

Summary updated

BibTeX
@article{tian2022improving,
  author = {Jinchuan Tian and Jianwei Yu and Chao Weng and Yuexian Zou and Dong Yu},
  title = {{Improving Mandarin End-to-End Speech Recognition with Word N-gram Language Model}},
  journal = {IEEE Signal Processing Letters},
  year = {2022},
  doi = {10.1109/lsp.2022.3154241},
}
Figure