drewThomasson commited on
Commit
dd17386
1 Parent(s): 54a3786

Create import_locally_stored_tts_model_files.py

Browse files
import_locally_stored_tts_model_files.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import shutil
3
+
4
+ # Define the source directory and the destination base path
5
+ source_dir = os.getcwd() # Current working directory
6
+ tts_folder = os.path.join(source_dir, 'tts')
7
+ destination_base = '/home/user/.local/share/'
8
+
9
+ # Define the destination path for the tts folder
10
+ destination_path = os.path.join(destination_base, 'tts')
11
+
12
+ # Move the entire tts folder
13
+ if os.path.exists(tts_folder):
14
+ # Remove the destination folder if it exists
15
+ if os.path.exists(destination_path):
16
+ shutil.rmtree(destination_path) # Remove the existing folder
17
+ shutil.move(tts_folder, destination_path)
18
+ print(f'Moved: {tts_folder} to {destination_path}')
19
+ else:
20
+ print(f'Source path does not exist: {tts_folder}')