piper-tts-training

piper-tts-training is a skill for Claude Code, Codex from sammcj/agentic-coding. It costs 79 tokens per session (1,470 once invoked), scanned A, original, Apache-2.0.

A set of instructions for training custom Piper text-to-speech voices in the lightweight ONNX format. It covers preparing speech data, recording or generating audio, fine-tuning models, validation, and device deployment.

In plain words
What is it for?
Use it to prepare voice datasets, train or fine-tune Piper models, export them for use on devices, and validate the generated speech.
Why use it?
It explains how to create a voice suited to a specific person, language, or use case instead of relying only on existing voices.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sammcj/agentic-coding/piper-tts-training
Any agent
npx skills add sammcj/agentic-coding --skill piper-tts-training
Clone the repo
git clone --depth 1 https://github.com/sammcj/agentic-coding

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for piper-tts-training

README.md
[![agentmods](https://agentmods.dev/badge/skills/sammcj/agentic-coding/piper-tts-training.svg)](https://agentmods.dev/skills/sammcj/agentic-coding/piper-tts-training)
Your own site
<a href="https://agentmods.dev/skills/sammcj/agentic-coding/piper-tts-training"><img src="https://agentmods.dev/badge/skills/sammcj/agentic-coding/piper-tts-training.svg" alt="Measured on agentmods" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,470 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00079 $0.01470
Opus 5 $0.00039 $0.00735
Sonnet 5 $0.00016 $0.00294
Haiku 4.5 $0.00008 $0.00147

Measured yesterday against content hash 3922b5095af2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

piper-tts-training scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/convert_spelling.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Skills_disabled/piper-tts-training/SKILL.md · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Piper TTS Voice Training

Train custom text-to-speech voices compatible with Piper's lightweight ONNX runtime.

Overview

Piper produces fast, offline TTS suitable for embedded devices. Training involves:

  1. Corpus preparation (text covering phonetic range)
  2. Audio generation or recording
  3. Quality validation via Whisper transcription
  4. Fine-tuning from existing checkpoint (recommended) or training from scratch
  5. ONNX export for deployment

Fine-tuning vs from-scratch:

  • Fine-tuning: ~1,300 phrases + 1,000 epochs (days on modest GPU)
  • From scratch: ~13,000+ phrases + 2,000+ epochs (weeks/months)

Workflow

1. Corpus Preparation

Gather 1,300-1,500+ phrases covering broad phonetic range:

  • Use piper-recording-studio corpus as base
  • Add domain-specific phrases for your use case
  • Include varied sentence structures and lengths

Critical for non-US English: Ensure corpus uses correct regional spelling. See Localisation.

2. Audio Generation

Generate or record training audio at 22050Hz mono WAV.

If using voice cloning (e.g., Chatterbox TTS):

  • Generate at source sample rate (often 24kHz)
  • Convert to 22050Hz: sox -v 0.95 input.wav -r 22050 -t wav output.wav
  • The -v 0.95 prevents clipping during resampling

Recording requirements:

  • Consistent microphone position and room acoustics
  • Minimal background noise
  • Natural speaking pace (not reading voice)

3. Quality Validation with Whisper

Automate quality checks rather than manual listening:

import whisper
from piper_phonemize import phonemize_text

model = whisper.load_model("base")

def validate_sample(audio_path, expected_text):
    result = model.transcribe(audio_path)
    transcribed = result["text"].strip()

    # Compare phonemically to handle spelling/punctuation differences
    expected_phonemes = phonemize_text(expected_text, "en-gb")
    transcribed_phonemes = phonemize_text(transcribed, "en-gb")

    return expected_phonemes == transcribed_phonemes

Read the full file on GitHub · 194 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 194 lines · 79 tokens per session scan A 3922b5095af2

Subscribe to this mod's changes

piper-tts-training is a skill published in the GitHub repository sammcj/agentic-coding (159 stars, last pushed yesterday), licensed Apache-2.0. It adds 79 tokens to every session and 1,470 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

strands-review

Local preview of the strands-agents/devtools /strands review agent. Body is the upstream Task Reviewer SOP verbatim — do not paraphrase. Use when the user types /strands-review, asks for a "strands review" of a PR, or wants to anticipate what the remote /strands review GitHub Action will flag. Findings are close but…

strands-agents/harness-sdk · 125 tokens

docs-writer

Draft or rewrite Strands Agents documentation pages. Use when writing new doc pages, rewriting pages that failed audit, drafting sections for existing pages, or writing blog posts and release notes about Strands. Also triggers on "write a doc", "draft a page", "rewrite the quickstart", "add a tutorial for X"…

strands-agents/harness-sdk · 74 tokens

pr-writer

Generates pull request titles and descriptions. Use when the user asks to create, open, write, draft, or generate a PR, pull request, or merge request description.

strands-agents/harness-sdk · 39 tokens

docs-planner

Identify documentation gaps and prioritize the docs backlog. Use when planning a docs improvement sprint, after signals surface repeated friction, when new SDK features ship without docs, or for periodic health assessment. Also triggers on "plan docs work", "what docs need writing", "prioritize the backlog", "docs…

strands-agents/harness-sdk · 73 tokens

pr-create

Creates a GitHub pull request using the gh CLI. Use when the user asks to create, open, or submit a PR on GitHub.

strands-agents/harness-sdk · 32 tokens

pr-feedback

Fetches PR review feedback and inline comments, categorizes them, and presents options to the user. Use when the user asks to get, read, address, or fix review comments on a pull request.

strands-agents/harness-sdk · 44 tokens