File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
examples/fastspeech2_libritts Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -118,12 +118,6 @@ def __init__(
118118 self .energy_load_fn = energy_load_fn
119119 self .mel_length_threshold = mel_length_threshold
120120 self .speakers_map = speakers_map
121- # sp_id = 0
122- # for i in self.utt_ids:
123- # sp_name = i.split("_")[0]
124- # if sp_name not in self.speakers_map:
125- # self.speakers_map[sp_name] = sp_id
126- # sp_id += 1
127121 self .speakers = [
128122 self .speakers_map [i .split ("_" )[0 ]] for i in self .utt_ids
129123 ] # TODO change but at the moment mfa folder name = speaker name
Original file line number Diff line number Diff line change @@ -359,8 +359,10 @@ def main():
359359 with open (args .dataset_mapping ) as f :
360360 dataset_mapping = json .load (f )
361361 speakers_map = dataset_mapping ["speakers_map" ]
362- print ("SPEAKERS MAP TYPE IS: " , type (speakers_map ))
363- print (speakers_map )
362+
363+ # Check n_speakers matches number of speakers in speakers_map
364+ n_speakers = config ["fastspeech2_params" ]["n_speakers" ]
365+ assert n_speakers == len (speakers_map )
364366
365367 # define train/valid dataset
366368 train_dataset = CharactorDurationF0EnergyMelDataset (
You can’t perform that action at this time.
0 commit comments