Esempio n. 1
0
 def create_datasets(self):
     root = self.config.data_params.librispeech_root
     print('Initializing train dataset.')
     train_dataset = LibriSpeech(root, train=True, 
                                 spectral_transforms=self.config.data_params.spectral_transforms,
                                 wavform_transforms=self.config.data_params.wavform_transforms,
                                 train_urls=self.config.data_params.train_urls)
     print('Initializing validation dataset.')
     val_dataset = LibriSpeech(root, train=False, 
                               spectral_transforms=self.config.data_params.spectral_transforms,
                               wavform_transforms=self.config.data_params.wavform_transforms,
                               # use the same split so same speakers
                               test_url=self.config.data_params.test_url)
     return train_dataset, val_dataset
Esempio n. 2
0
 def create_datasets(self):
     train_dataset = LibriSpeech(
         train=True,
         spectral_transforms=False,
         wavform_transforms=False,
         small=self.config.data_params.small,
         input_size=self.config.data_params.input_size,
     )
     val_dataset = LibriSpeech(
         train=False,
         spectral_transforms=False,
         wavform_transforms=False,
         small=self.config.data_params.small,
         test_url=self.config.data_params.test_url,
         input_size=self.config.data_params.input_size,
     )
     return train_dataset, val_dataset
Esempio n. 3
0
 def create_datasets(self):
     print('Initializing train dataset.')
     train_dataset = LibriSpeech(
         train=True,
         spectral_transforms=self.config.data_params.spectral_transforms,
         wavform_transforms=not self.config.data_params.spectral_transforms,
         small=self.config.data_params.small,
         input_size=self.config.data_params.input_size,
     )
     print('Initializing validation dataset.')
     val_dataset = LibriSpeech(
         train=False,
         spectral_transforms=False,
         wavform_transforms=False,
         small=self.config.data_params.small,
         test_url=self.config.data_params.test_url,
         input_size=self.config.data_params.input_size,
     )
     return train_dataset, val_dataset