Remove self.audio_config from VITS

This commit is contained in:
WeberJulian
2021-12-20 11:54:10 +00:00
committed by Eren Gölge
parent d39200e69b
commit 4cd0e4eb0d
+1 -2
View File
@@ -270,7 +270,6 @@ class Vits(BaseTTS):
super().__init__(config)
self.END2END = True
self.speaker_manager = speaker_manager
self.audio_config = config["audio"]
if config.__class__.__name__ == "VitsConfig":
@@ -408,7 +407,7 @@ class Vits(BaseTTS):
if (
hasattr(self.speaker_encoder, "audio_config")
and self.audio_config["sample_rate"] != self.speaker_encoder.audio_config["sample_rate"]
and self.config.audio["sample_rate"] != self.speaker_encoder.audio_config["sample_rate"]
):
raise RuntimeError(
" [!] To use the speaker consistency loss (SCL) you need to have the TTS model sampling rate ({}) equal to the speaker encoder sampling rate ({}) !".format(self.audio_config["sample_rate"], self.speaker_encoder.audio_config["sample_rate"])