From 771bff8c1f24a9889fa93199e18f5babb709a86a Mon Sep 17 00:00:00 2001 From: manmay-nakhashi Date: Tue, 2 May 2023 01:05:22 +0530 Subject: [PATCH] fix style and tests --- TTS/bin/synthesize.py | 10 +++++++--- TTS/tts/configs/tortoise_config.py | 1 - TTS/tts/models/tortoise.py | 1 - 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/TTS/bin/synthesize.py b/TTS/bin/synthesize.py index d7b0a7b8..b5ab409c 100755 --- a/TTS/bin/synthesize.py +++ b/TTS/bin/synthesize.py @@ -337,9 +337,6 @@ If you don't specify any models, then it uses LJSpeech based English model. if args.model_name is not None and not args.model_path: model_path, config_path, model_item = manager.download_model(args.model_name) - # tortoise model - if model_path.split("--")[-1] == "tortoise-v2": - model_dir = model_path # tts model if model_item["model_type"] == "tts_models": tts_path = model_path @@ -352,6 +349,13 @@ If you don't specify any models, then it uses LJSpeech based English model. vc_path = model_path vc_config_path = config_path + # tortoise model + if model_path.split("--")[-1] == "tortoise-v2": + model_dir = model_path + tts_path = None + tts_config_path = None + args.vocoder_name = None + # load vocoder if args.vocoder_name is not None and not args.vocoder_path: vocoder_path, vocoder_config_path, _ = manager.download_model(args.vocoder_name) diff --git a/TTS/tts/configs/tortoise_config.py b/TTS/tts/configs/tortoise_config.py index 59137d9c..87123f2d 100644 --- a/TTS/tts/configs/tortoise_config.py +++ b/TTS/tts/configs/tortoise_config.py @@ -1,5 +1,4 @@ from dataclasses import dataclass, field -from typing import List from TTS.tts.configs.shared_configs import BaseTTSConfig from TTS.tts.models.tortoise import TortoiseArgs, TortoiseAudioConfig diff --git a/TTS/tts/models/tortoise.py b/TTS/tts/models/tortoise.py index d0b4418b..c44c7ec5 100644 --- a/TTS/tts/models/tortoise.py +++ b/TTS/tts/models/tortoise.py @@ -1,4 +1,3 @@ -import os import random from contextlib import contextmanager from dataclasses import dataclass