Add the SCL resample TODO

This commit is contained in:
Edresson 2021-11-23 13:37:14 -03:00 committed by Eren Gölge
parent 54e33bff61
commit 67dda0abe1
1 changed files with 3 additions and 2 deletions

View File

@ -409,6 +409,7 @@ class Vits(BaseTTS):
hasattr(self.speaker_encoder, "audio_config")
and self.config.audio["sample_rate"] != self.speaker_encoder.audio_config["sample_rate"]
):
# TODO: change this with torchaudio Resample
raise RuntimeError(
' [!] To use the speaker consistency loss (SCL) you need to have matching sample rates between the TTS model ({}) and the speaker encoder ({})!'
.format(self.config.audio["sample_rate"], self.speaker_encoder.audio_config["sample_rate"])
@ -418,8 +419,8 @@ class Vits(BaseTTS):
orig_freq=self.audio_config["sample_rate"],
new_freq=self.speaker_encoder.audio_config["sample_rate"],
)
else:
self.audio_transform = None
else:
self.audio_transform = None
"""
else:
# self.audio_transform = None