From 8b75a78ad6808a929bc4fc7c8f2353870a7ccc0b Mon Sep 17 00:00:00 2001 From: Drew Thomasson <126999465+DrewThomasson@users.noreply.github.com> Date: Fri, 7 Mar 2025 22:30:29 -0500 Subject: [PATCH 1/2] feat: add new persian-tts-female-vits model --- TTS/.models.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/TTS/.models.json b/TTS/.models.json index 05c88bef43..624a6a0489 100644 --- a/TTS/.models.json +++ b/TTS/.models.json @@ -723,6 +723,17 @@ "description": "persian-tts-female-glow_tts model for text to speech purposes. Single-speaker female voice Trained on persian-tts-dataset-famale. \nThis model has no compatible vocoder thus the output quality is not very good. \nDataset: https://www.kaggle.com/datasets/magnoliasis/persian-tts-dataset-famale.", "author": "@karim23657", "license": "CC-BY-4.0" + }, + "vits-female": { + "hf_url": [ + "https://huggingface.co/Kamtera/persian-tts-female-vits/resolve/main/best_model_30824.pth", + "https://huggingface.co/Kamtera/persian-tts-female-vits/resolve/main/config.json" + ], + "default_vocoder": null, + "commit": null, + "description": "persian-tts-female-vits model for text to speech purposes. Single-speaker female voice trained on persian-tts-dataset-female.\nDataset: https://www.kaggle.com/datasets/magnoliasis/persian-tts-dataset-famale.", + "author": "@karim23657", + "license": "openrail" } } }, From 8776132f3567baff7cdefef4c30f829d48d8ad83 Mon Sep 17 00:00:00 2001 From: Enno Hermann Date: Mon, 10 Mar 2025 12:01:44 +0100 Subject: [PATCH 2/2] fix(api): if there are only 2 model urls, assume they are model and config --- TTS/api.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/TTS/api.py b/TTS/api.py index 3db1e25b11..bf91df4c6d 100644 --- a/TTS/api.py +++ b/TTS/api.py @@ -158,7 +158,15 @@ def download_model_by_name( self, model_name: str, vocoder_name: str | None = None ) -> tuple[Path | None, Path | None, Path | None, Path | None, Path | None]: model_path, config_path, model_item = self.manager.download_model(model_name) - if "fairseq" in model_name or (model_item is not None and isinstance(model_item["model_url"], list)): + if ( + "fairseq" in model_name + or "openvoice" in model_name + or ( + model_item is not None + and isinstance(model_item["model_url"], list) + and len(model_item["model_url"]) > 2 + ) + ): # return model directory if there are multiple files # we assume that the model knows how to load itself return None, None, None, None, model_path