Prepare data for training your own model
mainTo train ProDiff on a custom dataset, follow these steps:
- Configure Paths: In your config file, set
raw_data_dir,processed_data_dir, andbinary_data_dir. - Organize Raw Data: Download your dataset to
raw_data_dir. The structure must follow the pattern expected byegs/datasets/audio/*/pre_align.py(or you must adaptpre_align.pyfor your specific format). - Preprocessing Pipeline:
- Unify structure: Run
pre_align.py. - Alignment: Run MFA (Montreal Forced Aligner) via
train_mfa_align.py. - Binarization: Convert data to binary format for fast I/O using
binarize.py.
- Unify structure: Run
# 1. Preprocess step: unify the file structure
python data_gen/tts/bin/pre_align.py --config $path/to/config
# 2. Align step: MFA alignment
python data_gen/tts/runs/train_mfa_align.py --config $CONFIG_NAME
# 3. Binarization step: Binarize data for fast IO
CUDA_VISIBLE_DEVICES=$GPU python data_gen/tts/bin/binarize.py --config $path/to/config