Spaces:
Sleeping
Sleeping
File size: 840 Bytes
f98361b a105e1c f98361b |
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 shutil
print("Importing locally stored coqui tts models...")
# Define the source directory and the destination base path
tts_folder = "/home/user/app/Base_XTTS_Model"
destination_base = '/home/user/.local/share/'
# Define the destination path for the tts folder
destination_path = os.path.join(destination_base, 'tts')
# Move the entire tts folder
if os.path.exists(tts_folder):
# Remove the destination folder if it exists
if os.path.exists(destination_path):
shutil.rmtree(destination_path) # Remove the existing folder
shutil.move(tts_folder, destination_path)
print(f'Moved: {tts_folder} to {destination_path}')
print("Locally stored base coqui XTTS tts model imported!")
print(os.listdir('/home/user/.local/share/tts'))
else:
print(f'Source path does not exist: {tts_folder}')
|