li cheng commited on
Commit
7ee8daa
·
1 Parent(s): b0bcae6
Files changed (1) hide show
  1. xtts.py +3 -1
xtts.py CHANGED
@@ -98,7 +98,9 @@ def download_sample(url):
98
  try:
99
  response = requests.get(url)
100
  if response.status_code == 200:
101
- id=f'{sample_root}/{hash(f'{url}{response.headers["etag"]}')}.pt'.replace('"','')
 
 
102
  if(os.path.exists(id)):
103
  return "", id
104
  with tempfile.NamedTemporaryFile(mode="wb", suffix=".wav", delete=False) as temp_file:
 
98
  try:
99
  response = requests.get(url)
100
  if response.status_code == 200:
101
+ id=f'{url}{response.headers["etag"]}'
102
+ id=hash(id)
103
+ id=f'{sample_root}/{id}.pt'.replace('"','')
104
  if(os.path.exists(id)):
105
  return "", id
106
  with tempfile.NamedTemporaryFile(mode="wb", suffix=".wav", delete=False) as temp_file: