Speech-to-text

Punctuation, casing, and inverse text normalization

From 'twenty euros' to €20.

Updated 23 September 20266 min readBy the Reson8 research team

A speech recogniser hears words, not symbols. Somebody says "twenty euros on the third of March", and the useful transcript reads "€20 on 3 March." Inverse text normalisation (ITN) is the step that turns the spoken form into the written form, and punctuation and casing restoration make the result readable as sentences. Together they decide whether a transcript can be used as it is or needs cleaning by hand.

Key takeaways

  • ITN maps spoken forms ("one hundred and twelve") to written forms ("112"). It is the mirror image of the text normalisation used in text-to-speech.
  • Punctuation, casing and ITN can be separate post-processing models or produced directly by an end-to-end recogniser.
  • Most hard cases are ambiguous: "two thousand and five" can be a year, a quantity or part of a phone number. Context resolves it, rules alone often cannot.
  • Formatting conventions are language- and locale-specific. Dutch writes €20,50; English writes €20.50.
  • WER is usually computed after stripping formatting, so a system can score well and still produce transcripts that need heavy editing.

Spoken form and written form#

Classic recognisers were trained on transcripts written in spoken form: lower case, no punctuation, every number spelled out. That kept the output vocabulary small and the pronunciation lexicon consistent. The raw result of a call might be:

i would like to book two tickets for the fourteenth of june at seven thirty pm my number is oh six one two three four

A reader, a CRM field or a clinical record wants the written form:

I would like to book 2 tickets for 14 June at 7:30 p.m. My number is 06 1234.

Getting from one to the other involves three distinct tasks. Punctuation restoration inserts full stops, commas and question marks. Truecasing capitalises sentence starts, names and acronyms. ITN rewrites spans of words into numbers, dates, times, currencies, measurements, ordinals, email addresses and abbreviations.

Where it sits in the pipeline#

Recogniser spoken-form tokens Punctuation and casing ITN tag and verbalise Written text in it costs twenty euros fifty on march third P+C It costs twenty euros fifty on March third. ITN It costs €20.50 on 3 March. End-to-end models can emit the final line directly; the stages still exist conceptually.
A cascaded formatting pipeline. Each stage has its own failure modes, and errors compound: a missed full stop can stop a date grammar from matching.

In older and many current production systems these are post-processing stages applied to the recogniser's output. End-to-end models trained on written-form transcripts, Whisper being the best-known example, produce punctuation, casing and digits directly. That removes a component but does not remove the problem: the model still has to decide whether "one two" is "12" or "1 2", and it learns those conventions only from its training transcripts, which are rarely consistent.

Approaches#

Rule-based grammars#

The dominant approach for ITN is a hand-written grammar compiled into weighted finite-state transducers. Google's Kestrel system and the open NeMo text processing library both follow a two-step design: a tagger finds a span and classifies it (cardinal, date, money, time, telephone), then a verbaliser renders it in the target format. Grammars are precise, fast and auditable. They are also expensive to write for each language and they do not handle context: a grammar that turns "two thousand and five" into 2005 cannot know whether the speaker meant the year or a quantity.

Neural and hybrid models#

Sequence-to-sequence models can learn ITN from paired spoken and written text, and they use surrounding context well. Their risk is the one that makes rule systems attractive: an unconstrained neural model can produce plausible but wrong digits. Sproat and Jaitly's 2016 study of neural text normalisation found that such models, while accurate overall, occasionally make errors no grammar would, such as rendering a quantity with the wrong value or unit. Hybrid designs let a neural model choose among candidates generated by a grammar, or use a grammar to veto outputs that are not well-formed.

Punctuation and casing#

Punctuation and truecasing are usually treated as token classification: for each word, predict the punctuation mark that follows and whether it is capitalised. Transformer text encoders do this well on clean text. Acoustic cues help too: pauses and falling pitch mark sentence ends, and rising pitch often marks questions. Models that see only the words lose that signal.

Hard cases#

Spoken formPlausible written formsWhat decides it
two thousand and five2005 · 2,005Year or quantity
one two three four1234 · 1, 2, 3, 4Code or a list
half seven · half zeven7:30 (English) · 6:30 (Dutch)Language and locale
vier en twintig24Dutch units-before-tens order
quatre-vingt-dix-sept97French vigesimal counting
double oh seven007Spoken digit idioms
see you at oneat one · at 1:00Style guide

The last row shows that some choices are house style rather than correctness. News subtitlers often write small numbers as words; financial reports want digits. A single "correct" output does not exist, so a formatting system needs configuration or learnable preferences.

Identifiers are the hardest category because they carry no linguistic structure. "INB seven six two five X" should become INV7625X, but no general grammar knows that the prefix is INV. That is a biasing problem as much as a formatting one; see structured identifiers and numbers and alphanumerics.

Formatting in streaming output#

In streaming recognition, formatting runs on text that is still changing. A partial result of "twenty" may be rendered as "20", then become "20.50" when "euros fifty" arrives, then a full stop appears when the sentence closes. Many systems apply ITN and punctuation only to final segments to avoid visible flicker, which means partials look less polished than finals. For voice agents the language model consuming the transcript usually handles spoken-form numbers well, so heavy formatting matters less than for captions or documents.

Evaluating formatting#

Word error rate is normally computed after lower-casing, stripping punctuation and normalising numbers on both sides, precisely so that formatting differences do not count. That is fair for comparing recognisers and blind to formatting quality. To measure formatting itself, score the unnormalised output against a written-form reference, often called formatted or case-and-punctuation-sensitive WER, and track punctuation precision and recall per mark. For ITN, measure exact-match accuracy on a set of numeric, date and currency spans, because one wrong digit in an amount matters more than any number of missed commas. Evaluation beyond WER covers these metrics in more detail.

Common questions#

Is inverse text normalisation the same as text normalisation?

They are opposites. Text normalisation turns written text into spoken form, for example so a text-to-speech system can read "€20" aloud. ITN turns recogniser output in spoken form back into written text. Scoring normalisers for WER are a third thing: they map both texts to a shared canonical form.

Why does my transcript write some numbers as words and others as digits?

Most systems follow a style convention, often writing small cardinals as words and larger numbers, amounts and times as digits. End-to-end models also inherit inconsistencies from their training transcripts. If you need consistency, apply your own formatting pass to the final text.

Can I turn formatting off?

Many APIs expose options to disable punctuation or number formatting and return spoken-form text. This is useful when feeding a system that expects raw words, such as a keyword spotter or your own normalisation pipeline.

Does formatting affect accuracy scores?

Only if the scorer does not normalise. Always run reference and hypothesis through the same normaliser before comparing systems, then measure formatting separately.

References#

  1. Sproat, R., Black, A. W., Chen, S., Kumar, S., Ostendorf, M., & Richards, C. (2001). Normalization of non-standard words. Computer Speech & Language, 15(3).
  2. Ebden, P., & Sproat, R. (2015). The Kestrel TTS text normalization system. Natural Language Engineering, 21(3).
  3. Sproat, R., & Jaitly, N. (2016). RNN Approaches to Text Normalization: A Challenge. arXiv:1611.00068.
  4. Pusateri, E. et al. (2017). A Mostly Data-Driven Approach to Inverse Text Normalization. Interspeech.
  5. Zhang, Y., Bakhturina, E., Gorman, K., & Ginsburg, B. (2021). NeMo Inverse Text Normalization: From Development to Production. arXiv:2104.05055.
  6. Radford, A. et al. (2022). Robust Speech Recognition via Large-Scale Weak Supervision (Whisper). arXiv:2212.04356.

Try Reson8 on your own audio

Speech recognition for European languages that adapts to your vocabulary from text, in under a minute. Free tier, EU-only processing.