-
Notifications
You must be signed in to change notification settings - Fork 2
/
make_nsynthdataset.py
20 lines (13 loc) · 929 Bytes
/
make_nsynthdataset.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from datasetGenerator.exampleProcessor import ExampleProcessor
from datasetGenerator.nSynthDownloader import NSynthDownloader
from datasetGenerator.nSynthTFRecordGenerator import NSynthTFRecordGenerator
__author__ = 'Andres'
downloader = NSynthDownloader()
downloader.downloadAndExtract()
exampleProcessor = ExampleProcessor(gapLength=1024, sideLength=2048, hopSize=512, gapMinRMS=1e-3)
tfRecordGenerator = NSynthTFRecordGenerator(baseName='nsynth_test', pathToDataFolder=downloader.TEST_DIR, exampleProcessor=exampleProcessor)
tfRecordGenerator.generateDataset()
tfRecordGenerator = NSynthTFRecordGenerator(baseName='nsynth_valid', pathToDataFolder=downloader.VALID_DIR, exampleProcessor=exampleProcessor)
tfRecordGenerator.generateDataset()
tfRecordGenerator = NSynthTFRecordGenerator(baseName='nsynth_train', pathToDataFolder=downloader.TRAIN_DIR, exampleProcessor=exampleProcessor)
tfRecordGenerator.generateDataset()