Skip to content

API Reference parrot_formdesigner.audio.normalize

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_formdesigner.audio.normalize

View source

Typed post-processors for spoken form answers (FEAT-653).

normalize_spoken turns a transcript into the canonical value its field type expects. It is pure and sync (the audio engine never awaits) and never raises.

Alias NormalizeContext

Re-exported from parrot_formdesigner.audio.normalize.base.NormalizeContext.

Alias NormalizeResult

Re-exported from parrot_formdesigner.audio.normalize.base.NormalizeResult.

Alias REFINABLE_TYPES

Re-exported from parrot_formdesigner.audio.normalize.base.REFINABLE_TYPES.

Function normalize_spoken

Dispatch to the family normalizer; None when the type is not handled (caller keeps the raw text). Never raises.

normalize_spoken(field_type: FieldType, text: str, *, ctx: NormalizeContext) -> NormalizeResult | None

Parameter Type Default Description
field_type FieldType
text str
ctx NormalizeContext

Returns: NormalizeResult | None

Function validate_typed

Typed-answer check: 'INVALID_EMAIL' for a non-empty EMAIL value failing EMAIL_PATTERN; else None.

validate_typed(field_type: FieldType, value: str) -> str | None

Parameter Type Default Description
field_type FieldType
value str

Returns: str | None

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally