DDSP training requires preprocessing raw audio into TFRecord files with precomputed f0, loudness, and audio chunks
The ddsp_prepare_tfrecord script converts folders of .wav or .mp3 files into sharded TFRecord datasets for training. The preprocessing pipeline: splits audio into fixed-length chunks (default 4 seconds), runs CREPE to extract f0 and confidence per frame, computes A-weighted loudness, and stores all features together. This offline step is necessary because CREPE pitch extraction is too slow for online training. The resulting dataset is fed by TFRecordProvider during training. A synthetic data variant (ddsp_generate_synthetic_dataset) creates training data programmatically with known f0 and harmonic parameters, used for the self-supervised pitch detection paper.
Examples
ddsp_prepare_tfrecord \
--input_audio_filepatterns=/path/to/wavs/*.wav \
--output_tfrecord_path=/path/to/dataset.tfrecord \
--num_shards=10
Assessment
List the three features stored per audio chunk in a DDSP TFRecord. Why must this preprocessing happen offline rather than during training?