drewThomasson
commited on
Commit
•
3862713
1
Parent(s):
bfe61b1
Create download_tos_agreed_file.py
Browse files- download_tos_agreed_file.py +23 -0
download_tos_agreed_file.py
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import urllib.request
|
3 |
+
|
4 |
+
def download_tos_agreed():
|
5 |
+
# Get the current user's home directory
|
6 |
+
user_home = os.path.expanduser('~')
|
7 |
+
|
8 |
+
# Set the destination directory and file URL
|
9 |
+
dest_dir = os.path.join(user_home, '.local', 'share', 'tts', 'tts_models--multilingual--multi-dataset--xtts_v2')
|
10 |
+
file_url = "https://github.com/DrewThomasson/VoxNovel/raw/main/readme_files/tos_agreed.txt"
|
11 |
+
|
12 |
+
# Create the destination directory if it doesn't exist
|
13 |
+
os.makedirs(dest_dir, exist_ok=True)
|
14 |
+
|
15 |
+
# Download the file to the destination directory
|
16 |
+
file_path = os.path.join(dest_dir, 'tos_agreed.txt')
|
17 |
+
urllib.request.urlretrieve(file_url, file_path)
|
18 |
+
|
19 |
+
print(f"File has been saved to {file_path}")
|
20 |
+
print("The tos_agreed.txt file is so that you don't have to tell coqio TTS yes when downloading the xtts_v2 model.")
|
21 |
+
|
22 |
+
# Run the download function
|
23 |
+
download_tos_agreed()
|