cocktailpeanut commited on
Commit
f570b9b
·
1 Parent(s): 6a46dde
Files changed (1) hide show
  1. melo/download_utils.py +2 -2
melo/download_utils.py CHANGED
@@ -28,7 +28,7 @@ def load_or_download_config(locale):
28
  assert language in DOWNLOAD_CONFIG_URLS
29
 
30
  #config_path = os.path.expanduser(f'~/.local/share/openvoice/basespeakers/{language}/config.json')
31
- _config_path = os.path.join(current_dir, 'openvoice/basespeakers/{language}/config.json')
32
  config_path = os.path.expanduser(_config_path)
33
  try:
34
  return utils.get_hparams_from_file(config_path)
@@ -43,7 +43,7 @@ def load_or_download_model(locale, device):
43
  language = locale.split('-')[0].upper()
44
  assert language in DOWNLOAD_CKPT_URLS
45
  #ckpt_path = os.path.expanduser(f'~/.local/share/openvoice/basespeakers/{language}/checkpoint.pth')
46
- _ckpt_path = os.path.join(current_dir, 'openvoice/basespeakers/{language}/checkpoint.pth')
47
  ckpt_path = os.path.expanduser(_ckpt_path)
48
  try:
49
  return torch.load(ckpt_path, map_location=device)
 
28
  assert language in DOWNLOAD_CONFIG_URLS
29
 
30
  #config_path = os.path.expanduser(f'~/.local/share/openvoice/basespeakers/{language}/config.json')
31
+ _config_path = os.path.join(current_dir, f"openvoice/basespeakers/{language}/config.json")
32
  config_path = os.path.expanduser(_config_path)
33
  try:
34
  return utils.get_hparams_from_file(config_path)
 
43
  language = locale.split('-')[0].upper()
44
  assert language in DOWNLOAD_CKPT_URLS
45
  #ckpt_path = os.path.expanduser(f'~/.local/share/openvoice/basespeakers/{language}/checkpoint.pth')
46
+ _ckpt_path = os.path.join(current_dir, f"openvoice/basespeakers/{language}/checkpoint.pth")
47
  ckpt_path = os.path.expanduser(_ckpt_path)
48
  try:
49
  return torch.load(ckpt_path, map_location=device)