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