|
import subprocess |
|
import os |
|
|
|
|
|
languages = ["as", "hi", "ta"] |
|
base_url = "https://github.com/AI4Bharat/Indic-TTS/releases/download/v1-checkpoints-release" |
|
|
|
def download_and_extract(lang): |
|
if (os.path.exists(f"Indic-TTS/models")): |
|
print(f"Directory Indic-TTS/models exists") |
|
else: |
|
print(f"Creating directory Indic-TTS/models") |
|
os.makedirs(f"Indic-TTS/models") |
|
os.chdir(f"Indic-TTS/models") |
|
print(f"Downloading and extracting {lang}.zip...") |
|
|
|
subprocess.run(f"wget {base_url}/{lang}.zip", shell=True, check=True) |
|
subprocess.run(f"unzip -o {lang}.zip", shell=True, check=True) |
|
subprocess.run(f"rm {lang}.zip", shell=True, check=True) |
|
|
|
download_and_extract("hi") |
|
|
|
print("All languages downloaded and extracted.") |
|
|