> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://onepin.ai/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://onepin.ai/docs/_mcp/server.

# Pronunciation validator

> The Onepin Pronunciation validator (validator_pronunciation) — scores segmental pronunciation phoneme by phoneme, producing a 0–100 score from the phoneme error rate, and retries lines below the threshold.

**Family: Validator · `type: validator_pronunciation` · canvas name "Pronunciation" · beta**

The Pronunciation validator answers: **was each word actually pronounced correctly?** It listens to each generated line and scores pronunciation *phoneme by phoneme*, producing a phoneme error rate (PER) and a 0–100 score from it. Lines below the bar are retried; lines at or above it pass.

This is a finer check than [Accuracy](/docs/workflow/accuracy-validator). Accuracy transcribes the audio and compares words — a name said with the wrong stress usually still transcribes correctly and slips through. This validator hears the sounds themselves.

New to validators? Start with [how validators work](/docs/workflow/validators) — the pass/fail routing and retry behavior here are shared by every validator.

> **Warning**
>
> **English only.** This check scores US and British English (`en-us`, `en-gb`) audio. A Generator branch in any other language is rejected — the whole pronunciation chain is an English-branch feature today.

## Config

| Config key    | Default | Range                                           |
| ------------- | ------- | ----------------------------------------------- |
| `threshold`   | `99`    | 0–100 (score required to pass)                  |
| `max_retries` | `3`     | 1–50 (regeneration attempts for a failing line) |
| `k`           | `1.0`   | >0–10 (PER sensitivity)                         |

```python
node["config"] = {"threshold": 99.0, "max_retries": 3, "k": 1.0}
```

The score is `100 - k * PER * 100`. At the default `k` of `1.0` that is simply 100 minus the percentage of phonemes wrong. Raise `k` to widen the penalty per error.

> **Note**
>
> **Why the default is 99, not 70.** Its sibling validators score a matter of degree, so a 70 bar makes sense there. Here, at `k = 1.0`, a threshold of 90 still tolerates one sound in ten. Mispronunciation is a hard defect rather than a gradient, so the default is the near-zero-defect cutoff — and a looser bar is an explicit choice you make per node.

## Where it goes

**Place it last among a branch's validators.** Cheaper checks — [Naturalness](/docs/workflow/naturalness-validator), [Noise](/docs/workflow/noise-validator), [Accuracy](/docs/workflow/accuracy-validator) — belong before it, so it only grades lines they already passed.

Its ports carry two extra options the other validators don't have:

* **`pass`** — must reach [Export](/docs/workflow/export) over non-`fail` edges, including lines that exhausted their retries and left as "gave up". It may *also* feed a [Phoneme Injector](/docs/workflow/phoneme-injector) or a [Pronunciation Corrector](/docs/workflow/pronunciation-corrector), because a passing line can still carry individual mispronounced words — routing is on the score, independent of the per-word findings.
* **`fail`** — may loop back to the [Generator](/docs/workflow/generator) to regenerate, or feed a [Phoneme Injector](/docs/workflow/phoneme-injector), or feed a [Pronunciation Corrector](/docs/workflow/pronunciation-corrector). The Generator and the Corrector are both retry-loop targets: their output can loop back here to be re-graded within the retry budget.

```
   Generator ──▶ Phoneme Injector ──▶ Pronunciation ──pass──▶ Export
                                            │
                                          fail
                                            ▼
                                  Pronunciation Corrector
                                            │
                                            └──▶ back to Pronunciation (re-grade)
```

A [Phoneme Injector](/docs/workflow/phoneme-injector) wired into this check supplies the reference pronunciation it grades against, and must sit immediately before it.

## Inspect this node

#### Python

```python
client.nodes.get_node_detail(node_type="validator_pronunciation").data
```

#### CLI

```bash
onepin nodes show validator_pronunciation
```

#### API

```bash
curl https://api.onepin.ai/api/v2/nodes/validator_pronunciation \
  -H "Authorization: Bearer $ONEPIN_API_KEY"
```

## Related

* [Validators](/docs/workflow/validators) — pass/fail and retry, shared behavior
* [Phoneme Injector](/docs/workflow/phoneme-injector) — supplies the reference pronunciation
* [Pronunciation Corrector](/docs/workflow/pronunciation-corrector) — fixes what this flags
* [Fix pronunciations](/docs/guides/fix-pronunciations) — the whole chain, end to end