Skip to main content

normalize_text

Function normalize_text 

Source
fn normalize_text(
    normalizer: Option<&Normalizer>,
    asr: &str,
    options: NormalizeOptions,
    stages: &mut Stages,
) -> String
Expand description

Rewrite recognition output, recording what it cost.

A normalizer that fails mid-session must not cost the speaker their words: the raw text is returned and stages.normalize stays None, which is the same shape as no normalizer being configured. A caller knows which, because it knows what it configured.