From 54592213f4047f5780e289766ea5527f50e4753d Mon Sep 17 00:00:00 2001 From: TITC <35098797+TITC@users.noreply.github.com> Date: Mon, 20 Nov 2023 18:57:05 +0800 Subject: [PATCH] load multilingual model by path --- TTS/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TTS/api.py b/TTS/api.py index c8600dcd..8d273174 100644 --- a/TTS/api.py +++ b/TTS/api.py @@ -72,7 +72,8 @@ class TTS(nn.Module): self.csapi = None self.cs_api_model = cs_api_model self.model_name = "" - + if model_path is not None and not model_name: + self.model_name = Path(model_path).name if gpu: warnings.warn("`gpu` will be deprecated. Please use `tts.to(device)` instead.")