Skip to content
How-to GuideUnreviewed

Prepare training data

Build and verify per-dataset acoustic caches from raw singing corpora before launching a Vocalsynth training run. Each singer is keyed as dataset:speaker (for example, m4singer:Alto-1) so speaker identities stay distinct across datasets.

Preparing feature caches

Configure raw corpus paths and the RMVPE checkpoint in the data and preprocessing configs. Then build and verify the feature caches:

# Legacy v1 caches (data/cache)
uv run --project research/vocalsynth --extra preprocessing vocalsynth prepare-data \
  --config research/vocalsynth/configs/experiments/6/1.toml \
  --preprocessing-config research/data-pipeline/configs/preprocessing.toml \
  --runtime infra/runtime/local.toml

# Multilingual v2 caches (data/cache_v2)
uv run --project research/vocalsynth --extra preprocessing vocalsynth prepare-data \
  --config research/vocalsynth/configs/experiments/9/1.toml \
  --preprocessing-config research/vocalsynth/configs/data/preprocessing_v2.toml \
  --runtime infra/runtime/local.toml

uv run --project research/vocalsynth vocalsynth verify-data \
  --config research/vocalsynth/configs/experiments/9/1.toml \
  --runtime infra/runtime/local.toml

verify-data checks both the physical feature caches and all configured song splits (the pretraining mixture and, when a target singer is set, the target singer’s adaptation splits).

Each corpus is cached independently and combined at training time. To prepare a subset of configured corpora, pass repeated --dataset <name> flags to prepare-data. Existing caches are reused when preparation settings match. Pass --rebuild after modifying alignments or phoneme normalization, or pass --reuse-acoustics-from <cache_root> to recompute annotations and alignments while reusing existing Mel and F0 arrays.

V2 preprocessing and alignment (cache_v2)

V2 pretraining configs (research/vocalsynth/configs/data/multilingual_v2.toml) and held-out Opencpop evaluation (research/vocalsynth/configs/data/opencpop_v2.toml) share cache_root = "data/cache_v2" so training and evaluation use identical preprocessing from research/vocalsynth/configs/data/preprocessing_v2.toml:

  • phoneme_version = 2 maps corpus transcriptions into the cross-lingual inventory defined in Phoneme specification (v2 draft) while keeping all human-annotated outer boundaries (SP, AP, consonant onset starts, and syllable or rime ends) locked.
  • loudness_normalize = true scales every utterance in a song group by a single linear gain to target -23.0 LUFS integrated loudness, capped by -1.0 dBTP true-peak headroom (target_lufs = -23.0, max_true_peak_dbtp = -1.0), preserving within-song dynamic contrast between quiet and loud passages.
  • split_mandarin_codas = true and repair_m4singer_boundaries = true split Mandarin compound rimes into nucleus and coda (-n, ng, -i, -r) and re-align M4Singer voiceless consonant-to-vowel (C-V) transitions strictly inside locked outer boundaries via Mandarin multi-cue fusion (PhoneticXEUS restricted to research data preparation under CC BY-NC-SA 4.0 plus phonetic-acoustic cues).

Experiment #9 also requires GTSinger Japanese d78cd68d voiced '' and raw tag filtering, GTSinger Korean exclusion, and nus48e/ADIZ/sing/09 exclusion before rebuilding cache_v2 for Run #9.1. Adding variance conditioning under Variance and F0 parameter reference extends cache_v2 with sidecar variance and score features (training VarianceFrontend on ~79 h of score-annotated corpora while excluding scoreless NUS-48E).

Because multilingual_v2.toml and opencpop_v2.toml share data/cache_v2, prepare opencpop against the same preprocessing_v2.toml settings before running adaptation or held-out evaluation:

uv run --project research/vocalsynth --extra preprocessing vocalsynth prepare-data \
  --config research/vocalsynth/configs/data/opencpop_v2.toml \
  --preprocessing-config research/vocalsynth/configs/data/preprocessing_v2.toml \
  --runtime infra/runtime/local.toml

Extracting audio features

Audio trajectory experiments require self-supervised representations cached alongside Mel and F0 features.

Extract features using the experiment configuration that specifies data.audio_feature_source:

# Phonsa
uv run --project research/vocalsynth vocalsynth extract-audio-features \
  --config research/vocalsynth/configs/experiments/6/3.toml \
  --runtime infra/runtime/local.toml \
  --checkpoint local/assets/phonsa/Chinese_pretrained_model_Phonsa/best_model.pt

# PhoneticXEUS (requires third-party environment with espnet and huggingface-hub)
uv run --project research/vocalsynth vocalsynth extract-audio-features \
  --config research/vocalsynth/configs/experiments/7/2.toml \
  --runtime infra/runtime/local.toml \
  --python local/third_party/phonespam-env/bin/python

# PhoneticXEUS on Modal (stages resampled audio via the Training Store, hydrates the Modal Volume, extracts features on GPU, and syncs outputs back)
uv run --project research/vocalsynth vocalsynth extract-audio-features \
  --config research/vocalsynth/configs/experiments/7/2.toml \
  --runtime infra/runtime/modal.toml

Features are written into separate sidecar files (features/<source>.<split>.h5), leaving base acoustic caches untouched (see Storage for how cloud feature extraction populates the Training Store). Existing entries are skipped on rerun.

Confirm cache integrity:

uv run --project research/vocalsynth vocalsynth verify-data \
  --config research/vocalsynth/configs/experiments/7/2.toml \
  --runtime infra/runtime/local.toml

Song and singer splits

Training and validation sets are partitioned by whole song groups using the configured seed, while official test songs remain held out from both splits.

When a target singer is configured, that singer is held out from pretraining, and the target singer’s validation and test song groups are also excluded from all pretraining singers’ material so held-out melodies remain unseen. To adapt a pretrained model to the held-out singer, see Target Singer Adaptation.

To override the pretraining singer list for a specific training run without editing the config file, pass repeated --pretraining-singer <dataset:speaker> flags to vocalsynth train.

Type to search…

↑↓ navigate↵ selectEsc close