File size: 831 Bytes
dd17386
 
 
6e1478e
 
dd17386
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6e1478e
dd17386
 
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
source_dir = os.getcwd()  # Current working directory
tts_folder = os.path.join(source_dir, 'tts')
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 coqui tts models imported!")
else:
    print(f'Source path does not exist: {tts_folder}')