Extract Xeus kmeans unit IDs from metadata-listed audio and save .npy files beside each audio file:
uv run python preprocess/save_codes.py \
--root-path /path/to/dataset_root \
--metadata-glob "*/*_metadata.csv" \
--kmeans-model ckpt/xeus/kmeans_xeus.pklNotes:
--kmeans-modelis required.--xeus-configand--xeus-checkpointdefault to files inckpt/xeus/.- Output path is
<audio_path_without_ext>.npy(for examplefoo/bar/sample.mp3 -> foo/bar/sample.npy).
Multi-GPU (2 ranks) example:
# Terminal 1
LOCAL_RANK=0 RANK=0 WORLD_SIZE=2 uv run python preprocess/save_codes.py \
--root-path /path/to/dataset_root \
--metadata-glob "*/*_metadata.csv" \
--kmeans-model ckpt/xeus/kmeans_xeus.pkl
# Terminal 2
LOCAL_RANK=1 RANK=1 WORLD_SIZE=2 uv run python preprocess/save_codes.py \
--root-path /path/to/dataset_root \
--metadata-glob "*/*_metadata.csv" \
--kmeans-model ckpt/xeus/kmeans_xeus.pklThe trainer logs metrics and spectrogram images to Weights & Biases via Lightning's WandbLogger.
Online run:
wandb login
WANDB_PROJECT=cfm-vc uv run python train.py -c configs/config.json -m exp-nameOffline run:
WANDB_MODE=offline WANDB_PROJECT=cfm-vc uv run python train.py -c configs/config.json -m exp-nameNotes:
- Run name defaults to the
-mmodel name. - Training config is attached to the WandB run automatically.
Run single-example GameVC inference from source audio and target audio:
uv run python inference.py \
--source-audio /path/to/source.mp3 \
--target-audio /path/to/target.mp3 \
--checkpoint logs/gamevc/checkpoints/last-EMA.ckpt \
--kmeans-model ckpt/xeus/kmeans_xeus.pklNotes:
- If
--configis omitted, the script resolvesconfig.jsonfrom the checkpoint directory first, for examplelogs/gamevc/checkpoints/last-EMA.ckpt -> logs/gamevc/config.json. - The current script saves the predicted mel spectrogram as
.npy; waveform synthesis is not wired in because the available Vocos checkpoint does not match this repo's mel hop size.