Why WFSTs Power Number Expansion in TTS Systems

Despite the dominance of end-to-end deep learning in modern speech synthesis, Weighted Finite-State Transducers (WFSTs) remain the gold standard for number expansion and text normalization in production Text-to-Speech (TTS) pipelines. While neural models excel at acoustic generation, they struggle with the precision required to convert non-standard words like "$3.50," "1984," or "3/4" into their spoken equivalents ("three dollars and fifty cents," "nineteen eighty-four," and "three quarters"). WFSTs persist because they guarantee zero hallucinations, operate with microsecond latency, offer exact traceability for debugging, and provide bidirectional utility across speech technologies.

Zero Hallucination and Absolute Determinism

The primary failure mode of sequence-to-sequence neural text normalizers is hallucination. A neural model may arbitrarily misread an account number, substitute a date, or invent words when encountering unfamiliar numeric formats. In commercial and mission-critical voice applications—such as navigation, banking, and medical transcription—a single hallucinated digit is intolerable.

WFSTs are mathematically deterministic. They encode linguistic rules as states and weighted transitions, ensuring that a given numeric pattern maps only to valid, predefined spoken representations. If an input cannot be parsed, the system fails predictably rather than generating plausible-sounding nonsense.

Microsecond Latency and Minimal Compute

Production TTS systems, especially interactive conversational agents, must operate with tight end-to-end latency budgets (often under 200 milliseconds). Deploying an auxiliary transformer or neural network solely to normalize text introduces unnecessary GPU requirements, memory overhead, and inference delays.

In contrast, compiled WFST grammars—built with toolkits like OpenFst or Pynini—execute in the order of microseconds using negligible CPU and RAM. The entire grammar can be composed, determinized, and minimized offline into an optimized graph, making runtime lookups essentially instantaneous.

Granular Debugging and Regression Control

When a production TTS system mispronounces a specific format—such as reading "2024" as "two thousand twenty-four" instead of "twenty twenty-four" in a date context—engineers using WFSTs can trace the exact transduction path through the graph. The issue can be resolved by adjusting a single transition weight or introducing a specific rule constraint.

With neural approaches, correcting an edge case typically requires retraining or fine-tuning the model, which introduces the risk of catastrophic forgetting and regressions across previously working patterns. WFSTs provide strict isolation, making continuous integration and rule validation predictable.

Morphosyntactic Agreement in Complex Languages

Expanding numbers requires more than replacing digits with words; it demands correct morphosyntactic agreement based on gender, case, and number. For example, in inflected languages like Polish, Russian, or German, a cardinal or ordinal number changes its suffix depending on the governing preposition and noun.

WFSTs handle this complexity through composition (\(T_1 \circ T_2 \circ T_3\)). A pipeline can separate the process into modular stages:

  1. Classification: Tagging tokens (e.g., identifying a token as a date, currency, or cardinal).
  2. Expansion: Generating candidate spoken word strings.
  3. Agreement/Grammar: Filtering paths using language-specific grammatical transducers to enforce correct case declension.

Invertibility for Speech Recognition (ITN)

WFSTs are fundamentally bidirectional. By inverting the input and output labels of a transducer, a text normalization grammar (written to spoken) can often be repurposed for Inverse Text Normalization (ITN), which converts spoken automated speech recognition (ASR) output back into standard written text. Maintaining a single, mathematically rigorous framework for both TTS and ASR reduces cross-team engineering overhead and ensures consistency across a company’s entire speech stack.