Validate every line

Gate your audio on accuracy, naturalness, and clarity — failing lines regenerate automatically before export.

“It produced audio” isn’t the bar — “every line cleared the checks” is. Onepin has three validators; wire all three and a line is delivered only after it passes accuracy (said the words), naturalness (sounds human), and noise (clean audio). Lines that miss a bar regenerate automatically.

The shape

Chain the validators after the Generator, each fail wired back to it:

┌──────────── fail ─────────────┬──────────────┐
▼ │ │
Generator ──▶ Accuracy ─pass─▶ Naturalness ─pass─▶ Noise ─pass─▶ Export

Wire it on the canvas, or run a template that ships with validation. Each validator keeps its own retry budget; a line failing several checks in one round regenerates once, not once per check.

Set the bars

Each validator takes a threshold (the score to beat) and max_retries (regeneration budget):

1for node in definition["graph"]["nodes"]:
2 if node["type"] == "validator_error_rate": # Accuracy
3 node["config"] = {"threshold": 95.0, "max_retries": 5}
4 elif node["type"] == "validator_naturalness":
5 node["config"] = {"threshold": 75.0, "max_retries": 3}
6 elif node["type"] == "validator_noise":
7 node["config"] = {"threshold": 70.0, "max_retries": 3}

Raise a threshold for a stricter bar. Raise max_retries for stubborn content — names, numbers, dense technical text.

What “delivered” means

  • A line reaches Export only when every validator on its path has passed it.
  • A line that exhausts its retries is delivered anyway — the best-scoring attempt across all tries, marked with its scores. A run never stalls on one stubborn line.
  • After the run, every line shows each check’s score and how many retries it took — so you can see exactly what was regenerated and why, and where to raise or lower a bar.

When to use fewer checks

Every check scores every line, so validation adds run time and credits. Accuracy-only is a sensible floor for drafts; add Naturalness and Noise for anything you publish. To drop failing lines instead of retrying them, leave a validator’s fail port unwired.