- Home
- Skills
- Sammcj
- Agentic Coding
- Piper Tts Training
piper-tts-training_skill
- Python
110
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill sammcj/agentic-coding --skill piper-tts-training- SKILL.md5.7 KB
Overview
This skill trains custom text-to-speech voices for Piper and exports optimized ONNX models for fast, offline runtime on devices like Raspberry Pi and Home Assistant. It supports fine-tuning existing Piper checkpoints or training from scratch and includes tools for dataset preparation, Whisper-based validation, training orchestration, and ONNX export. The workflow is designed for reproducible results on modest GPUs and embedded deployments.
How this skill works
Prepare a phoneme-complete corpus and 22.05 kHz mono WAV audio, validate samples automatically with Whisper transcription and phoneme comparison, then preprocess into a PyTorch-friendly dataset. Train by fine-tuning a high-quality checkpoint (recommended) or training from scratch, monitor convergence with TensorBoard, and export the final model to ONNX and simplify it with onnxsim. Create a JSON metadata file for runtime configuration and deploy the ONNX to target devices.
When to use it
- Creating a new synthetic voice for a product or assistant.
- Fine-tuning an existing Piper checkpoint to match a target speaker or style.
- Preparing and validating an audio corpus for TTS training.
- Exporting and deploying compact TTS models to Raspberry Pi or Home Assistant.
- Adapting voice models to regional English variants (UK/AU/NZ).
Best practices
- Prefer fine-tuning with ~1,300+ phrases for practical training time; use from-scratch only for very large corpora (13k+).
- Record or generate 22.05 kHz mono WAV; if source differs, resample with sox using -v 0.95 to avoid clipping.
- Automate quality checks with Whisper and phonemisation to target 95%+ validated samples.
- Use espeak-ng language codes (en-gb/en-au) and run spelling conversions to avoid accent drift.
- Pin dependency versions and use a Docker container for reproducible environments.
Example use cases
- Fine-tune a neutral TTS voice to sound like a brand narrator for an embedded kiosk.
- Train a regional English voice (UK/AU/NZ) by converting spelling and using en-gb phonemisation.
- Validate and clean a mixed-quality recording dataset using Whisper before training.
- Export a compact ONNX model for offline Home Assistant voice responses on Raspberry Pi.
FAQ
Fine-tuning works well with ~1,300–1,500 phrases; training from scratch typically needs 13,000+ phrases.
What sample rate and format are required?
Use 22050 Hz mono WAV for training. If your source is different, resample to 22.05 kHz before preprocessing.
How do I avoid accent drift for UK/AU/NZ English?
Convert American spellings, use en-gb or en-au espeak-ng phonemisation, and validate with Whisper phoneme comparisons.