Add files via upload

This commit is contained in:
Sam Khoze
2024-06-18 19:41:56 -07:00
committed by GitHub
parent 8580e27fbd
commit 7d608044ef
36 changed files with 14511 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
from typing import Dict, List, Union
from TTS.utils.generic_utils import find_module
def setup_model(config: "Coqpit", samples: Union[List[List], List[Dict]] = None) -> "BaseTTS":
print(" > Using model: {}".format(config.model))
# fetch the right model implementation.
if "base_model" in config and config["base_model"] is not None:
MyModel = find_module("TTS.tts.models", config.base_model.lower())
else:
MyModel = find_module("TTS.tts.models", config.model.lower())
model = MyModel.init_from_config(config=config, samples=samples)
return model