This commit is contained in:
Eren G??lge 2023-01-30 14:02:25 +01:00
parent 7fddabc8ac
commit 6ee94f8bad
2 changed files with 4 additions and 2 deletions

View File

@ -102,7 +102,6 @@ class TTS:
return model_path, config_path, vocoder_path, vocoder_config_path
def load_model_by_name(self, model_name: str, gpu: bool = False):
model_path, config_path, vocoder_path, vocoder_config_path = self.download_model_by_name(model_name)
""" Load one of 🐸TTS models by name.
Args:
@ -111,6 +110,9 @@ class TTS:
TODO: Add tests
"""
model_path, config_path, vocoder_path, vocoder_config_path = self.download_model_by_name(model_name)
# init synthesizer
# None values are fetch from the model
self.synthesizer = Synthesizer(

View File

@ -37,7 +37,7 @@ class TTSTest(unittest.TestCase):
self.assertGreater(len(tts.speakers), 1)
self.assertGreater(len(tts.languages), 1)
def test_voice_cloning():
def test_voice_cloning(self):
tts = TTS()
tts.load_model_by_name("tts_models/multilingual/multi-dataset/your_tts")
tts.tts_to_file("Hello world!", speaker_wav=cloning_test_wav_path, language="en", file_path=OUTPUT_PATH)