clean code

This commit is contained in:
Stardust·减
2023-09-05 01:05:15 +08:00
committed by GitHub
parent f83227dac5
commit 7810be71b0

View File

@@ -93,12 +93,6 @@ class TextAudioSpeakerLoader(torch.utils.data.Dataset):
spec = torch.load(spec_filename)
except:
if self.use_mel_spec_posterior:
# if os.path.exists(filename.replace(".wav", ".spec.pt")):
# # spec, n_fft, num_mels, sampling_rate, fmin, fmax
# spec = spec_to_mel_torch(
# torch.load(filename.replace(".wav", ".spec.pt")),
# self.filter_length, self.n_mel_channels, self.sampling_rate,
# self.hparams.mel_fmin, self.hparams.mel_fmax)
spec = mel_spectrogram_torch(audio_norm, self.filter_length,
self.n_mel_channels, self.sampling_rate, self.hop_length,
self.win_length, self.hparams.mel_fmin, self.hparams.mel_fmax, center=False)
@@ -111,7 +105,6 @@ class TextAudioSpeakerLoader(torch.utils.data.Dataset):
return spec, audio_norm
def get_text(self, text, word2ph, phone, tone, language_str, wav_path):
# print(text, word2ph,phone, tone, language_str)
pold = phone
w2pho = [i for i in word2ph]
word2ph = [i for i in word2ph]