diff --git a/.pylintrc b/.pylintrc index 7ab186a..9628641 100644 --- a/.pylintrc +++ b/.pylintrc @@ -292,13 +292,6 @@ max-line-length=120 # Maximum number of lines in a module. max-module-lines=1000 -# List of optional constructs for which whitespace checking is disabled. `dict- -# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. -# `trailing-comma` allows a space between comma and closing bracket: (a, ). -# `empty-line` allows space-only lines. -no-space-check=trailing-comma, - dict-separator - # Allow the body of a class to be on the same line as the declaration if body # contains single statement. single-line-class-stmt=no @@ -528,5 +521,5 @@ min-public-methods=2 # Exceptions that will emit a warning when being caught. Defaults to # "BaseException, Exception". -overgeneral-exceptions=BaseException, - Exception +overgeneral-exceptions=builtins.BaseException, + builtins.Exception diff --git a/matcha/VERSION b/matcha/VERSION index bbdeab6..442b113 100644 --- a/matcha/VERSION +++ b/matcha/VERSION @@ -1 +1 @@ -0.0.5 +0.0.5.1 diff --git a/matcha/app.py b/matcha/app.py index 16e8077..d68fbaa 100644 --- a/matcha/app.py +++ b/matcha/app.py @@ -29,8 +29,15 @@ CURRENTLY_LOADED_MODEL = args.model -MATCHA_TTS_LOC = lambda x: LOCATION / f"{x}.ckpt" # noqa: E731 -VOCODER_LOC = lambda x: LOCATION / f"{x}" # noqa: E731 + +def MATCHA_TTS_LOC(x): + return LOCATION / f"{x}.ckpt" + + +def VOCODER_LOC(x): + return LOCATION / f"{x}" + + LOGO_URL = "https://shivammehta25.github.io/Matcha-TTS/images/logo.png" RADIO_OPTIONS = { "Multi Speaker (VCTK)": { diff --git a/matcha/cli.py b/matcha/cli.py index f3c29a7..579d7d6 100644 --- a/matcha/cli.py +++ b/matcha/cli.py @@ -23,8 +23,8 @@ } VOCODER_URLS = { - "hifigan_T2_v1": "https://drive.google.com/file/d/14NENd4equCBLyyCSke114Mv6YR_j_uFs/view?usp=drive_link", - "hifigan_univ_v1": "https://drive.google.com/file/d/1qpgI41wNXFcH-iKq1Y42JlBC9j0je8PW/view?usp=drive_link", + "hifigan_T2_v1": "https://github.com/shivammehta25/Matcha-TTS-checkpoints/releases/download/v1.0/generator_v1", # Old url: https://drive.google.com/file/d/14NENd4equCBLyyCSke114Mv6YR_j_uFs/view?usp=drive_link + "hifigan_univ_v1": "https://github.com/shivammehta25/Matcha-TTS-checkpoints/releases/download/v1.0/g_02500000", # Old url: https://drive.google.com/file/d/1qpgI41wNXFcH-iKq1Y42JlBC9j0je8PW/view?usp=drive_link } MULTISPEAKER_MODEL = { diff --git a/matcha/utils/utils.py b/matcha/utils/utils.py index 5f8162d..af65e09 100644 --- a/matcha/utils/utils.py +++ b/matcha/utils/utils.py @@ -115,7 +115,7 @@ def get_metric_value(metric_dict: Dict[str, Any], metric_name: str) -> float: return None if metric_name not in metric_dict: - raise Exception( + raise ValueError( f"Metric value not found! \n" "Make sure metric name logged in LightningModule is correct!\n" "Make sure `optimized_metric` name in `hparams_search` config is correct!" @@ -205,11 +205,13 @@ def get_user_data_dir(appname="matcha_tts"): return final_path -def assert_model_downloaded(checkpoint_path, url, use_wget=False): +def assert_model_downloaded(checkpoint_path, url, use_wget=True): if Path(checkpoint_path).exists(): log.debug(f"[+] Model already present at {checkpoint_path}!") + print(f"[+] Model already present at {checkpoint_path}!") return log.info(f"[-] Model not found at {checkpoint_path}! Will download it") + print(f"[-] Model not found at {checkpoint_path}! Will download it") checkpoint_path = str(checkpoint_path) if not use_wget: gdown.download(url=url, output=checkpoint_path, quiet=False, fuzzy=True)