style-tts2
Use StyleTTS2 source-checkout workflows for TTS data/config preparation, staged CUDA training, fine-tuning, pretrained inference, and troubleshooting.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- style-tts2
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Use StyleTTS2 source-checkout workflows for TTS data/config preparation, staged CUDA training, fine-tuning, pretrained inference, and troubleshooting.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/repo-provenance.md2.5 KB
- 参考文档references/repo-routing-metadata.json319 B
- 参考文档references/runtime-overview.md5.1 KB
- 参考文档references/troubleshooting.md3.9 KB
- 脚本scripts/check_runtime.py8.0 KB
03 SKILL.md 正文
StyleTTS2 repo skill
Use this operating skill when a task involves the StyleTTS2 research repository: text-to-speech training, fine-tuning, pretrained LJSpeech/LibriTTS inference, source-checkout dependency checks, or debugging data/config/checkpoint failures.
First decision
- Preparing data lists, OOD text, YAML configs, 24 kHz audio roots, or asset paths: read sub-skills/data-and-config/SKILL.md.
- Launching first-stage training, second-stage training, fine-tuning, or the one-GPU Accelerate fine-tune path: read sub-skills/training/SKILL.md.
- Running or troubleshooting pretrained LJSpeech/LibriTTS demos, phonemizer/espeak setup, reference audio, diffusion/style controls, or voice-use cautions: read sub-skills/inference/SKILL.md.
If the request is unclear, start with data/config validation before attempting a training or inference run.
Repository shape and runtime assumptions
StyleTTS2 is source-checkout research code, not an installable Python distribution. Do not claim that pip install -e . works unless packaging metadata has been added after this skill was generated. Use the checkout as the working tree and run the repository launchers through bundled helpers.
Read references/runtime-overview.md for the distilled repository layout, dependency set, backend expectations, and verified helper APIs. Read references/repo-provenance.md before deciding whether this skill is stale for a different checkout.
Quick runtime check
Before a task that depends on imports or CUDA, run the bundled safe checker from this skill directory or with an explicit checkout path:
python scripts/check_runtime.py --repo-root /path/to/StyleTTS2 --check-cuda
The checker imports source modules, reports missing hidden dependencies, and can optionally load helper assets without starting training, downloading models, or synthesizing audio.
Installation notes
The repository README documents:
pip install -r requirements.txt
For local training/inference, also account for runtime imports and demo dependencies discovered from source inspection:
python -m pip install pandas tensorboard
python -m pip install phonemizer # inference demos only; also provide espeak-ng or espeak
Use a CUDA-enabled PyTorch/Torchaudio build for training and fine-tuning. Inference can run on CPU or CUDA, but CPU is slower.
Common routes
| Task signal | Route | First safe action |
|---|---|---|
list row, root_path, OOD text, config YAML, missing data |
data-and-config | Run validate_data_lists.py or inspect_config.py. |
train_first.py, train_second.py, train_finetune.py, checkpoint resume, OOM, NaN |
training | Run build_training_command.py in dry-run mode. |
LJSpeech/LibriTTS demo, reference audio, phonemizer, alpha, beta, diffusion_steps |
inference | Run check_inference_assets.py. |
import failure, CUDA unavailable, missing pandas/tensorboard, source checkout not importable |
references/troubleshooting.md | Run scripts/check_runtime.py. |
Safety and ethics
Training jobs are long-running CUDA jobs that write checkpoints/logs and may download WavLM through Transformers. Do not start them without explicit user approval. Pretrained voice outputs must be disclosed as synthesized unless the user has voice permission and license rights.
Router metadata
This skill routes under the speech/audio scenario via references/repo-routing-metadata.json. Do not hand-edit the live repo-skills-router; use the verifier/import helper if the user later asks to import.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).