VITS の Decoder を Multi-Band iSTFT + PQMF に置き換えたバージョン。HiFi-GAN Generator を完全に廃止し、トータルの upsample 倍率 256x を維持しつつ Decoder の計算コストを大幅削減。
1# Step 1: データセット前処理
2uv run python -m piper_train.preprocess \
3 --input-dir /path/to/your-ljspeech-data \
4 --output-dir /path/to/dataset \
5 --language ja \
6 --dataset-format ljspeech \
7 --sample-rate 22050 \
8 --single-speaker \
9 --phoneme-type multilingual
10
11# Step 2: Prosody Features 追加 (日本語の場合、推奨)
12uv run python add_prosody_features.py \
13 --input-dataset /path/to/dataset/dataset.jsonl \
14 --output-dir /path/to/dataset-prosody \
15 --workers 4
16
17# Step 3: ファインチューニング
18uv run python -m piper_train \
19 --dataset-dir /path/to/dataset-prosody \
20 --prosody-dim 16 \
21 --accelerator gpu \
22 --devices 1 \
23 --precision 32-true \
24 --max_epochs 500 \
25 --batch-size 4 \
26 --samples-per-speaker 4 \
27 --checkpoint-epochs 50 \
28 --base_lr 2e-5 \
29 --disable_auto_lr_scaling \
30 --ema-decay 0.9995 \
31 --max-phoneme-ids 400 \
32 --no-wavlm \
33 --resume-from-multispeaker-checkpoint /path/to/model.ckpt \
34 --default_root_dir /path/to/output
1uv run python -m piper_train \
2 --dataset-dir /path/to/multi-speaker-dataset \
3 --prosody-dim 16 \
4 --accelerator gpu \
5 --devices 4 \
6 --precision 32-true \
7 --max_epochs 150 \
8 --batch-size 20 \
9 --samples-per-speaker 2 \
10 --base_lr 2e-4 \
11 --disable_auto_lr_scaling \
12 --ema-decay 0.9995 \
13 --max-phoneme-ids 400 \
14 --no-wavlm \
15 --resume_from_checkpoint /path/to/model.ckpt \
16 --default_root_dir /path/to/output
1CUDA_VISIBLE_DEVICES="" uv run python -m piper_train.export_onnx \
2 /path/to/checkpoint.ckpt \
3 /path/to/output.onnx
1CUDA_VISIBLE_DEVICES="" uv run python -m piper_train.infer_onnx \
2 --model /path/to/output.onnx \
3 --config /path/to/config.json \
4 --output-dir /path/to/output \
5 --text "こんにちは、今日は良い天気ですね。" \
6 --language ja-en-zh-es-fr-pt \
7 --speaker-id 0 --noise-scale 0.667
1CUDA_VISIBLE_DEVICES="" uv run python -m piper_train.export_onnx \
2 --unify-emb-lang \
3 /path/to/checkpoint.ckpt \
4 /path/to/output.onnx
1@software{piper_plus,
2 title = {Piper Plus: Multilingual TTS with VITS, Prosody Features, MB-iSTFT Decoder},
3 author = {ayousanz},
4 year = {2024},
5 url = {https://github.com/ayutaz/piper-plus}
6}