num_sample=args.num_sample, normalize_vq=True, noise_x=True, noise_y=True).cuda() dataset_type = 'multi' elif model_type == 'wavernn': print("Model type is wavernn") model_fn = lambda dataset: wr.Model(rnn_dims=896, fc_dims=896, pad=2, upsample_factors=(4, 4, 4), feat_dims=80).cuda() dataset_type = 'single' elif model_type == 'nc': print("Model type is nc") model_fn = lambda dataset: nc.Model(rnn_dims=896, fc_dims=896).cuda() dataset_type = 'single' else: sys.exit(f'Unknown model: {model_type}') if dataset_type == 'multi': data_path = config.multi_speaker_data_path with open(f'{data_path}/index.pkl', 'rb') as f: index = pickle.load(f) logger.log(f"len of vctk index pkl object is {len(index)}" ) # should be equal to total number of speakers in the dataset # logger.log(f"index.pkl file --- index[:5] {index[:5]}") # logger.log(f"index.pkl file --- index[0][:5] {index[0][:5]}") test_index = [
noise_x=True, noise_y=True, DEVICE=DEVICE).to(DEVICE) dataset_type = 'multi' elif model_type == 'wavernn': raise ValueError("NYI wavernn") model_fn = lambda dataset: wr.Model(rnn_dims=896, fc_dims=896, pad=2, upsample_factors=(4, 4, 4), feat_dims=80, DEVICE=DEVICE).to(DEVICE) dataset_type = 'single' elif model_type == 'nc': raise ValueError("NYI nc") model_fn = lambda dataset: nc.Model( rnn_dims=896, fc_dims=896, DEVICE=DEVICE).to(DEVICE) dataset_type = 'single' else: sys.exit(f'Unknown model: {model_type}') if dataset_type == 'multi': """ data_path = config.multi_speaker_data_path data_path = "gt_data_dir" with open(f'{data_path}/index.pkl', 'rb') as f: index = pickle.load(f) test_index = [x[-1:] if i < 2 * args.count else [] for i, x in enumerate(index)] train_index = [x[:-1] if i < args.count else x for i, x in enumerate(index)] dataset = env.MultispeakerDataset(train_index, data_path) """ elif dataset_type == 'single':