load multilingual model by path

This commit is contained in:
TITC 2023-11-20 18:57:05 +08:00 committed by GitHub
parent 29dede20d3
commit 54592213f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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.")