Skip to content

Commit ca72582

Browse files
committed
Reverse last change
1 parent 9dc0233 commit ca72582

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/fastspeech2_libritts/fastspeech2_dataset.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ 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+
self.speakers = [self.speakers_map[i.split("_")[0]] for i in self.utt_ids]
121122
self.f0_stat = np.load(f0_stat)
122123
self.energy_stat = np.load(energy_stat)
123124

@@ -141,7 +142,7 @@ def generator(self, utt_ids):
141142
duration_file = self.duration_files[i]
142143
f0_file = self.f0_files[i]
143144
energy_file = self.energy_files[i]
144-
speaker_id = self.speakers_map[utt_id.split("_")[0]]
145+
speaker_id = self.speakers[0]
145146

146147
items = {
147148
"utt_ids": utt_id,

0 commit comments

Comments
 (0)