Beispiel #1
0
 def _create_dataloader(self, batch_size, r, bgs):
     items = ljspeech(c.data_path, 'metadata.csv')
     dataset = TTSDataset.MyDataset(r,
                                    c.text_cleaner,
                                    ap=self.ap,
                                    meta_data=items,
                                    batch_group_size=bgs,
                                    min_seq_len=c.min_seq_len,
                                    max_seq_len=float("inf"),
                                    use_phonemes=False)
     dataloader = DataLoader(dataset,
                             batch_size=batch_size,
                             shuffle=False,
                             collate_fn=dataset.collate_fn,
                             drop_last=True,
                             num_workers=c.num_loader_workers)
     return dataloader, dataset
Beispiel #2
0
 def _create_dataloader(self, batch_size, r, bgs):
     dataset = TTSDataset.MyDataset(
         c.data_path,
         'metadata.csv',
         r,
         c.text_cleaner,
         preprocessor=ljspeech,
         ap=self.ap,
         batch_group_size=bgs,
         min_seq_len=c.min_seq_len)
     dataloader = DataLoader(
         dataset,
         batch_size=batch_size,
         shuffle=False,
         collate_fn=dataset.collate_fn,
         drop_last=True,
         num_workers=c.num_loader_workers)
     return dataloader, dataset