Skip to content

Document enable_text_normalization SWML AI param#362

Open
Devon-White wants to merge 3 commits into
mainfrom
Devon/enable-text-normalization
Open

Document enable_text_normalization SWML AI param#362
Devon-White wants to merge 3 commits into
mainfrom
Devon/enable-text-normalization

Conversation

@Devon-White
Copy link
Copy Markdown
Collaborator

What

Documents the enable_text_normalization SWML AI verb param — NeMo-based text normalization between written and spoken forms during AI voice conversations.

  • heard — Inverse Text Normalization (ITN) on ASR output before the LLM (twenty three dollars$23)
  • spoken — Text Normalization (TN) on LLM output before TTS ($23twenty three dollars)
  • both — both directions (default)

Changes

  • TypeSpec (specs/swml/calling/Methods/ai/ai_params.tsp): new AIParams field as an inline string-literal union (heard | spoken | both | true | on | false | off | none | SWMLVar), default both.
  • Generated schema (SWMLObject.json): regenerated via tsp compile (additive only).
  • Reference docs (ai_params/index.mdx): ParamField in the Speech Recognition section + anchored values sub-section (modes, disable keywords, per-language graceful-skip behavior).

Source fidelity

Default and accepted values follow the FreeSWITCH mod_openai source (session.c): default is both (enabled), and true/on/false/off/none keywords are accepted alongside the three canonical modes.

The originally-supplied 19-language support matrix is not included: supported languages are determined at runtime by which NeMo FAR grammar files are deployed (not enumerated in source), so the docs describe the lazy-load + graceful-skip behavior generally instead of publishing an unverified table.

auto_correct (mutually exclusive, but Partial/stub with an unwired OART TODO) is intentionally left undocumented.

Add the enable_text_normalization param to the AI verb's params object and
the AI params reference page.

- TypeSpec: new AIParams field as an inline string-literal union
  (heard | spoken | both | true | on | false | off | none | SWMLVar),
  default "both"; regenerate SWMLObject.json.
- Docs: ParamField in the Speech Recognition section plus an anchored
  values sub-section covering the modes, disable keywords, and per-language
  graceful-skip behavior.

Defaults and accepted values follow the FreeSWITCH mod_openai source
(default is "both", enabled). The supported-language matrix is not
enumerated in source (runtime FAR grammars), so it is described generally
rather than tabulated.
Lead with the benefit and plain before/after examples; drop internal
jargon (NeMo, ITN/TN acronyms up front, calling.error event) from the
ParamField, values table, and TypeSpec @doc. Regenerate SWMLObject.json.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

@hey-august hey-august linked an issue Jun 5, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New AI Param enable_text_normalization

2 participants