mirror of
https://github.com/shivammehta25/Matcha-TTS.git
synced 2026-02-04 09:49:21 +08:00
Updating different url for hifigan as well
This commit is contained in:
@@ -51,9 +51,9 @@ RADIO_OPTIONS = {
|
||||
}
|
||||
|
||||
# Ensure all the required models are downloaded
|
||||
assert_model_downloaded(MATCHA_TTS_LOC("matcha_ljspeech"), MATCHA_URLS["matcha_ljspeech"], use_wget=True)
|
||||
assert_model_downloaded(MATCHA_TTS_LOC("matcha_ljspeech"), MATCHA_URLS["matcha_ljspeech"])
|
||||
assert_model_downloaded(VOCODER_LOC("hifigan_T2_v1"), VOCODER_URLS["hifigan_T2_v1"])
|
||||
assert_model_downloaded(MATCHA_TTS_LOC("matcha_vctk"), MATCHA_URLS["matcha_vctk"], use_wget=True)
|
||||
assert_model_downloaded(MATCHA_TTS_LOC("matcha_vctk"), MATCHA_URLS["matcha_vctk"])
|
||||
assert_model_downloaded(VOCODER_LOC("hifigan_univ_v1"), VOCODER_URLS["hifigan_univ_v1"])
|
||||
|
||||
device = get_device(args)
|
||||
|
||||
@@ -23,8 +23,8 @@ MATCHA_URLS = {
|
||||
}
|
||||
|
||||
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 = {
|
||||
@@ -74,7 +74,7 @@ def assert_required_models_available(args):
|
||||
model_path = args.checkpoint_path
|
||||
else:
|
||||
model_path = save_dir / f"{args.model}.ckpt"
|
||||
assert_model_downloaded(model_path, MATCHA_URLS[args.model], use_wget=True)
|
||||
assert_model_downloaded(model_path, MATCHA_URLS[args.model])
|
||||
|
||||
vocoder_path = save_dir / f"{args.vocoder}"
|
||||
assert_model_downloaded(vocoder_path, VOCODER_URLS[args.vocoder])
|
||||
|
||||
@@ -205,7 +205,7 @@ 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}!")
|
||||
|
||||
Reference in New Issue
Block a user