Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计通过

piper-tts-training派珀 tts 培训

Agent Skill

piper-tts-training 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,444

周安装

59

GitHub Stars

125

下载量

467
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:piper-tts-training(派珀 tts 培训)
来源仓库:https://github.com/sammcj/agentic-coding
仓库路径:skills/piper-tts-training
安装命令:
npx skills add https://github.com/sammcj/agentic-coding --skill piper-tts-training
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/sammcj/agentic-coding --skill piper-tts-training

简介

piper-tts-training 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 安装前需确认权限范围、维护状态,注意是否涉及联网、命令执行或文件读写操作。
  • 建议结合原始 README 和仓库内容进一步核验具体功能和使用边界。

SKILL.md

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

Retry failed samples up to 3 times. Target 95%+ dataset coverage.

4. Dataset Format (LJSpeech)

Structure your dataset:

dataset/
├── metadata.csv
└── wavs/
    ├── sample_0001.wav
    ├── sample_0002.wav
    └── ...

metadata.csv format: {id}|{text} (pipe-separated, no headers)

sample_0001|The quick brown fox jumps over the lazy dog.
sample_0002|Pack my box with five dozen liquor jugs.

5. Preprocessing

Convert to PyTorch tensors:

python3 -m piper_train.preprocess \
    --language en-gb \
    --input-dir dataset/ \
    --output-dir piper_training_dir/ \
    --dataset-format ljspeech

Use en-gb for Australian/NZ/UK voices (espeak-ng phoneme set).

6. Training

Fine-tuning (recommended):

python3 -m piper_train \
    --dataset-dir piper_training_dir/ \
    --accelerator gpu \
    --devices 1 \
    --batch-size 12 \
    --max_epochs 3000 \
    --resume_from_checkpoint ljspeech-2000.ckpt \
    --checkpoint-epochs 100 \
    --quality high \
    --precision 32

Key parameters:

  • --batch-size: Reduce if VRAM limited (12 works on 8GB)
  • --resume_from_checkpoint: Start from LJSpeech high-quality checkpoint
  • --precision 32: More stable than mixed precision
  • --validation-split 0.0 --num-test-examples 0: Skip validation for small datasets

Monitor with TensorBoard: watch loss_disc_all for convergence.

7. ONNX Export

python3 -m piper_train.export_onnx checkpoint.ckpt output.onnx.unoptimized
onnxsim output.onnx.unoptimized output.onnx

Create metadata file output.onnx.json from training config.json.

Localisation for Australian, New Zealand and UK English

Piper uses espeak-ng for phonemisation. American pronunciations in training data cause accent drift.

Corpus preparation:

  • Run scripts/convert_spelling.py on corpus text before training
  • Use en-gb or en-au espeak-ng voice for phonemisation
  • Review generated phonemes for Americanisms

Common spelling conversions:

AmericanAustralian/UK
-ize-ise
-or-our
-er-re
-og-ogue
-ense-ence

Phoneme considerations:

  • /r/ linking and intrusion patterns differ
  • Vowel sounds in words like "dance", "bath", "castle"
  • Final -ile pronunciation (hostile, missile)

For complete word lists and phonetic details, see references/localisation.md.

Validation: Use Whisper with language="en" and verify transcriptions match expected regional forms.

Dependencies

Pin versions to avoid API breakage:

pytorch-lightning==1.9.3
torch<2.6.0
piper-phonemize
onnxruntime-gpu
onnxsim

Docker containerisation recommended for reproducibility.

Hardware Requirements

Minimum (fine-tuning):

  • 8GB VRAM GPU (Pascal or newer)
  • 8GB system RAM
  • ~5 days for 1,000 epochs on Tesla P4

From scratch: Multiply time by ~200x.

Troubleshooting

IssueSolution
CUDA OOMReduce batch-size (try 8 or 4)
Checkpoint won't loadCheck pytorch-lightning version matches checkpoint
Garbled outputInsufficient training epochs or dataset too small
Wrong accentCheck espeak-ng language code and corpus spelling

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.18%
按下载量换算169

Claude

32.65%
按下载量换算152

Cursor

16.88%
按下载量换算79

Gemini CLI

8.56%
按下载量换算40

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills