training-and-data-prep
Guide ClearerVoice-Studio training, fine-tuning, launchers, data lists, target speaker extraction, and speech-enhancement data generation without starting expensive jobs.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- training-and-data-prep
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Guide ClearerVoice-Studio training, fine-tuning, launchers, data lists, target speaker extraction, and speech-enhancement data generation without starting expensive jobs.
- disable-model-invocation
- true
02 资源文件 7
- 参考文档references/config-and-data-formats.md7.1 KB
- 参考文档references/data-generation.md4.9 KB
- 参考文档references/target-speaker-extraction.md6.2 KB
- 参考文档references/training-workflows.md6.8 KB
- 参考文档references/troubleshooting.md6.0 KB
- 脚本scripts/inspect_training_config.py15.6 KB
- 脚本scripts/make_scp_list.py4.6 KB
03 SKILL.md 正文
Training and Data Prep
Use this sub-skill when a user needs to prepare or sanity-check ClearerVoice-Studio training, fine-tuning, evaluation-only runs, custom data lists, or speech-enhancement data generation. Keep actions cheap unless the user explicitly authorizes a training/evaluation job.
Route First
- Use this sub-skill for local training and fine-tuning of speech enhancement, speech separation, speech super-resolution, offline target speaker extraction, online target speaker extraction, training-list construction, and config/list checks.
- Route packaged pretrained ClearVoice API inference to
clearvoice-inference; this sub-skill only covers the repository's training-side inference launchers used for checkpoints and custom configs. - Route PESQ/STOI/SI-SDR/SDR-style objective scoring and benchmark metric interpretation to
speechscore-metrics; this sub-skill only prepares outputs and lists for metrics. - Do not start full training, distributed evaluation, data mixing, or RIR/noisy generation without user confirmation about GPUs, runtime, dataset paths, output mutation, and checkpoint overwrite risk.
Fast Operating Flow
- Identify the task family: speech enhancement (SE), speech separation (SS), speech super-resolution (SR), offline target speaker extraction (TSE), online TSE, or speech-enhancement data generation.
- Read the relevant reference below before editing configs or proposing a command.
- Use
scripts/inspect_training_config.pyon the chosen YAML/JSON config before launch, especially when changing sample rates, data paths, checkpoint paths, or TSE modalities. - Use
scripts/make_scp_list.pyto build one-path-per-line inference lists or SR lists from local audio/video directories; for paired SE/SS training lists, write or validate the multi-column format described in the references. - For any launcher copied from memory, replace hard-coded GPU IDs,
n_gpu, andmaster_port; setcheckpoint_dir,train_from_last_checkpoint, and init/fine-tune settings deliberately. - For TSE, verify that the CSV/list partitions, audio directory, and modality/reference directory match the selected cue before discussing training.
Bundled References and Scripts
- Read references/training-workflows.md when choosing or adapting SE/SS/SR train, fine-tune, resume, and training-side inference commands.
- Read references/config-and-data-formats.md when editing YAML/JSON configs, creating
.scpfiles, or diagnosing sampling-rate/list mismatches. - Read references/data-generation.md before running additive-noise or reverb-noisy speech-enhancement data generation, because those scripts write new output trees.
- Read references/target-speaker-extraction.md when preparing offline or online TSE configs, modality directories, mixture CSV files, checkpoint init/resume, or evaluation-only runs.
- Read references/troubleshooting.md when a launch fails on CUDA, distributed setup, missing paths, FFmpeg/media dependencies, checkpoints, sample rates, or TSE modality data.
- Run scripts/inspect_training_config.py before launch to summarize a YAML/JSON training or inference config, detect likely path fields, and optionally warn about missing paths without importing training modules.
- Run scripts/make_scp_list.py to create sorted one-path-per-line audio/video lists safely; it dry-runs by default and writes only when explicitly requested.
Safety Rules
- Treat repository launchers as templates, not turnkey commands: they contain fixed GPU IDs and dynamic master ports that often need editing.
- Prefer
torchrunon modern PyTorch if the legacy distributed launcher is unavailable, but keep equivalent values for process count, visible devices, and rendezvous/master port. - Keep all data paths, checkpoint paths, and generated-output paths explicit and user-owned; never assume example paths are valid.
- For fine-tuning, distinguish resume (
train_from_last_checkpoint=1, optimizer state restored) from weight initialization (init_checkpoint_pathorinit_from, optimizer reset/new run). - For data generation, work on copied configs/lists and a new output directory or run number; generation scripts mutate outputs and may overwrite or append files.
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).