li cheng
commited on
Commit
·
7ee8daa
1
Parent(s):
b0bcae6
try id
Browse files
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'{
|
|
|
|
|
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:
|