pip install -r requirements.txt -f https://download.pytorch.org/whl/torch_stable.html
Use src\timbre_transfer\datasets\NSynthDataset\NSynthDataset.py
:
Example :
from src.timbre_transfer.datasets.NSynthDataset import NSynthDataset
root_dir = 'data'
train_dataset = NSynthDataset(root_dir = root_dir, usage = 'train', select_class='vocal_acoustic', transform=None)
Dataset files hierarchy (here, the root_dir is named "data", as shown on the Python example above) :
- data/
- nsynth/
- nsynth-test/
- examples.json
- audio/
- All audio files (.wav) used for testing
- nsynth-train/
- examples.json
- audio/
- All audio files (.wav) used for training
- nsynth-valid/
- examples.json
- audio/
- All audio files (.wav) used for validating
- nsynth-test/
- nsynth/
source /miniconda/bin/activate
2VAEs : python train_2VAEs.py
2VAEs + CC : python train_2VAEs_CC.py
2VAEs + CC + GAN : python train_2VAEs_CC_GAN.py
2VAEs : python exports_2VAE.py
2VAEs + CC : python exports_2VAE_CC.py
2VAEs + CC + GAN : python exports_2VAE_CC_GAN.py
Audio results presented in https://gbittencourt.github.io/ATIAM2022-timbre-transfer/