mirror of
https://github.com/wassname/TTS.git
synced 2026-09-09 11:16:00 +08:00
Fixup
This commit is contained in:
+3
-1
@@ -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(
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user