diff --git a/prepare_data.py b/prepare_data.py index 6d5fc4f..1f067fe 100644 --- a/prepare_data.py +++ b/prepare_data.py @@ -26,7 +26,7 @@ def __len__(self): return len(self.landmarks_frame) def __getitem__(self, idx): - wav_name = os.path.join(self.root_dir, self.landmarks_frame.ix[idx, 0]) + '.wav' + wav_name = os.path.join(self.root_dir, self.landmarks_frame.loc[idx, 0]) + '.wav' mel, mag = get_spectrograms(wav_name) np.save(wav_name[:-4] + '.pt', mel) diff --git a/preprocess.py b/preprocess.py index 58328bb..40e147e 100644 --- a/preprocess.py +++ b/preprocess.py @@ -31,8 +31,8 @@ def __len__(self): return len(self.landmarks_frame) def __getitem__(self, idx): - wav_name = os.path.join(self.root_dir, self.landmarks_frame.ix[idx, 0]) + '.wav' - text = self.landmarks_frame.ix[idx, 1] + wav_name = os.path.join(self.root_dir, self.landmarks_frame.loc[idx, 0]) + '.wav' + text = self.landmarks_frame.loc[idx, 1] text = np.asarray(text_to_sequence(text, [hp.cleaners]), dtype=np.int32) mel = np.load(wav_name[:-4] + '.pt.npy') @@ -62,7 +62,7 @@ def __len__(self): return len(self.landmarks_frame) def __getitem__(self, idx): - wav_name = os.path.join(self.root_dir, self.landmarks_frame.ix[idx, 0]) + '.wav' + wav_name = os.path.join(self.root_dir, self.landmarks_frame.loc[idx, 0]) + '.wav' mel = np.load(wav_name[:-4] + '.pt.npy') mag = np.load(wav_name[:-4] + '.mag.npy') sample = {'mel':mel, 'mag':mag}