A Unified Transformer-based Framework for Duplex Text Normalization

Tuan Manh Lai, Yang Zhang, Evelina Bakhturina, Boris Ginsburg, Heng JiarXiv 2021

Abstract

Text normalization (TN) and inverse text normalization (ITN) are essential preprocessing and postprocessing steps for text-to-speech synthesis and automatic speech recognition, respectively. Many methods have been proposed for either TN or ITN, ranging from weighted finite-state transducers to neural networks. Despite their impressive performance, these methods aim to tackle only one of the two tasks but not both. As a result, in a complete spoken dialog system, two separate models for TN and ITN need to be built. This heterogeneity increases the technical complexity of the system, which in turn increases the cost of maintenance in a production setting. Motivated by this observation, we propose a unified framework for building a single neural duplex system that can simultaneously handle TN and ITN. Combined with a simple but effective data augmentation method, our systems achieve state-of-the-art results on the Google TN dataset for English and Russian. They can also reach over 95% sentence-level accuracy on an internal English TN dataset without any additional fine-tuning. In addition, we also create a cleaned dataset from the Spoken Wikipedia Corpora for German and report the performance of our systems on the dataset. Overall, experimental results demonstrate the proposed duplex text normalization framework is highly effective and applicable to a range of domains and languages.

Introduction

In modern speech technology, the ability to bridge the gap between written and spoken language is critical. Text Normalization (TN) involves converting written text (e.g., "72") into its spoken equivalent ("seventy two"), a prerequisite for high-quality Text-to-Speech (TTS) systems. Conversely, Inverse Text Normalization (ITN) transforms spoken transcripts into standard written forms, which is essential for readable Automatic Speech Recognition (ASR) output.

The relationship between Written Form and Spoken Form via TN and ITN.

Traditionally, these tasks have been handled by separate, hand-crafted systems like Weighted Finite-State Transducers (WFSTs). While effective, WFSTs are difficult to maintain and scale. Recent neural approaches have shown promise but typically focus on "simplex" models—handling only one direction. This necessitates maintaining two distinct models in production, increasing engineering overhead.

The Duplex Framework

To address this, researchers from NVIDIA and UIUC developed a unified, Transformer-based "duplex" system. This framework utilizes a two-stage pipeline to process text efficiently regardless of the direction.

The two-stage pipeline: Step 1 (Tagging) and Step 2 (Normalizing).

1. The Tagger

The first stage uses a Transformer encoder (such as BERT or RoBERTa) to identify "semiotic spans"—segments of the sentence that require transformation, such as dates, times, or currencies. The tagger assigns labels like SAME for text to be kept as-is or TRANSFORM for spans requiring normalization.

2. The Normalizer

The second stage is a Transformer-based Seq2Seq model (like T5). It takes the identified spans along with their surrounding context and performs the actual conversion. To enable the "duplex" capability, a task indicator prefix (e.g., TN or ITN) is prepended to the input, signaling the model which direction to transform the text.

Robustness through Data Augmentation

A common failure mode for neural TN/ITN models is sensitivity to the exact boundaries of semiotic spans. If the Tagger makes a minor error, the Normalizer might fail. To mitigate this, the authors introduced a data augmentation strategy where the Normalizer is trained on "noisy" spans that include extra context words. This forces the model to learn the core semiotic element's relationship to its surroundings, significantly improving robustness.

Experimental Results

The framework was evaluated across several benchmarks:

  • Google TN Dataset: Achieved state-of-the-art results for English (98.36% TN accuracy) and Russian.
  • Spoken Wikipedia Corpora (German): Demonstrated strong multi-language performance on a newly cleaned dataset.
  • NLU Assistant: An internal conversational dataset where the model achieved over 95% accuracy in a zero-shot setting, highlighting its ability to generalize beyond its training domain.

Manual error analysis showed that "unrecoverable" errors—those that change the meaning of the text—occurred in only 0.146% of cases. Most remaining challenges involve complex strings like URLs or technical identifiers.

Conclusion

The proposed duplex framework simplifies speech processing pipelines by replacing two separate models with a single, high-performing Transformer system. By leveraging task-prefixing and context-aware normalization, the system matches or exceeds the performance of specialized simplex models while offering greater maintainability and cross-domain robustness. Future work will explore scaling this to a single multilingual model and reducing reliance on large labeled datasets.

Summary updated

BibTeX
@misc{lai2021unified,
  author = {Tuan Manh Lai and Yang Zhang and Evelina Bakhturina and Boris Ginsburg and Heng Ji},
  title = {{A Unified Transformer-based Framework for Duplex Text Normalization}},
  year = {2021},
  eprint = {2108.09889},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.09889},
}
Figure