Piper training requires a config.json and a dataset.jsonl file. These are generated using the piper_train.preprocess module.
Input Dataset Format
The pre-processing script expects a directory containing:
wav/: A directory containing audio files.metadata.csv: A pipe-delimited (|) CSV file with no header.
Single-speaker format:
id|text (where id is the filename without extension).
Multi-speaker format:
id|speaker|text (where speaker is the name of the speaker).
Pre-processing Command
Use the following command to generate the training files. For multi-speaker datasets, omit the --single-speaker flag.
# Single-speaker example
python3 -m piper_train.preprocess \
--language en-us \
--input-dir /path/to/dataset_dir/ \
--output-dir /path/to/training_dir/ \
--dataset-format ljspeech \
--single-speaker \
--sample-rate 22050