austinroy commited on
Commit
bec08b5
·
1 Parent(s): 9be2e3a

Initial commit

Browse files
Files changed (1) hide show
  1. echobox/src/echobox/vc.py +3 -2
echobox/src/echobox/vc.py CHANGED
@@ -1,3 +1,4 @@
 
1
  from pathlib import Path
2
 
3
  import librosa
@@ -10,7 +11,7 @@ from .models.s3gen import S3GEN_SR, S3Gen
10
 
11
 
12
  REPO_ID = "Lookingsoft-team/EchoBoxTTS"
13
-
14
 
15
  class ChatterboxVC:
16
  ENC_COND_LEN = 6 * S3_SR
@@ -53,7 +54,7 @@ class ChatterboxVC:
53
  @classmethod
54
  def from_pretrained(cls, device) -> 'ChatterboxVC':
55
  for fpath in ["s3gen.pt", "conds.pt"]:
56
- local_path = hf_hub_download(repo_id=REPO_ID, filename=fpath)
57
 
58
  return cls.from_local(Path(local_path).parent, device)
59
 
 
1
+ import os
2
  from pathlib import Path
3
 
4
  import librosa
 
11
 
12
 
13
  REPO_ID = "Lookingsoft-team/EchoBoxTTS"
14
+ HF_TOKEN = os.environ.get("HF_TOKEN")
15
 
16
  class ChatterboxVC:
17
  ENC_COND_LEN = 6 * S3_SR
 
54
  @classmethod
55
  def from_pretrained(cls, device) -> 'ChatterboxVC':
56
  for fpath in ["s3gen.pt", "conds.pt"]:
57
+ local_path = hf_hub_download(repo_id=REPO_ID, filename=fpath, token=HF_TOKEN)
58
 
59
  return cls.from_local(Path(local_path).parent, device)
60