Recognition result normalization

Normalization is converting (post-processing) the text that results from running a Yandex SpeechKit speech recognition model. It is carried out based on the parameters specified in the API requests.

Note

Normalization is not done in auto language (auto language code) recognition mode.

You can use the following normalization levels:

  • Representing dates and time in numeric format.
  • Converting numbers from dictionary to numeric format.
  • Capitalizing the beginning of a sentence and proper nouns.
  • Profanity masking.
  • Formatting phone numbers, e.g., 7(999)123-45-67 instead of 7 999 123 45 67.
  • Adding punctuation marks.

Warning

Rules for the presentation of normalized text may change. Please consider this during integration and stay tuned for updates.

Managing normalization parameters

API v1

Normalization level API parameter
Profanity masking profanityFilter=true
Converting numbers from dictionary to numeric format Enabled by default. To disable, set rawResults=true

API v2

Normalization level API parameter
Profanity masking config.specification.profanityFilter=true
Converting numbers from dictionary to numeric format Enabled by default. To disable, set config.specification.rawResults=true
Normalization level API parameter
Profanity masking config.specification.profanityFilter=true
Converting numbers from dictionary to numeric format Enabled by default. To disable, set config.specification.rawResults=true
Capitalizing the beginning of a sentence and proper nouns. Adding punctuation marks config.specification.literature_text=true

API v3

To enable normalization, set the text_normalization=TEXT_NORMALIZATION_ENABLED parameter in the API. Some options are activated by additional parameters if you set text_normalization=TEXT_NORMALIZATION_ENABLED.

Normalization level API parameter Supported languages
Representing dates and time in numeric format text_normalization=TEXT_NORMALIZATION_ENABLED ru, uz, kk, en, fr, de, es, it, tr
Converting numbers from dictionary to numeric format text_normalization=TEXT_NORMALIZATION_ENABLED ru, uz, kk, en, fr, de, es, it, tr
Formatting phone numbers text_normalization=TEXT_NORMALIZATION_ENABLED. To disable this level only, additionally specify phone_formatting_mode=PHONE_FORMATTING_MODE_DISABLED. ru
Not performance-tested: en, fr, de, es, it, tr
Profanity masking profanity_filter=true with text_normalization enabled ru
Not performance-tested: en, fr, de, es, it, tr
Capitalizing the beginning of a sentence and proper nouns. Adding punctuation marks literature_text=true with text_normalization enabled ru

Normalization is performed only if there is one language in the list of allowed languages. Normalization is not supported for the following languages: pt, pl, nl, fi, sv, he, auto.