| |
| import os |
| from utils.default_models import ensure_default_models |
| from pathlib import Path |
| Sagemaker = False |
| if Sagemaker : |
| env='source activate python3 && conda activate VideoMessage &&' |
| else: |
| env='' |
| |
| is_first_time = True |
|
|
| |
| |
| |
| parent_dir = os.getcwd() |
| print(parent_dir) |
| if is_first_time: |
| |
| directory = "sample_data" |
| |
| path = os.path.join(parent_dir, directory) |
| print(path) |
| try: |
| os.mkdir(path) |
| print("Directory '% s' created" % directory) |
| except Exception: |
| print("Directory '% s'was already created" % directory) |
| if is_first_time: |
| os.system('git clone https://github.com/Rudrabha/Wav2Lip') |
| |
| |
| print("Preparing the models of Wav2Lip") |
| ensure_default_models(Path("Wav2Lip")) |
| os.system('git clone https://github.com/Edresson/Coqui-TTS -b multilingual-torchaudio-SE TTS') |
| os.system('{} pip install -q -e TTS/'.format(env)) |
| os.system('{} pip install -q torchaudio==0.9.0'.format(env)) |
| os.system('{} pip install -q youtube-dl'.format(env)) |
| os.system('{} pip install ffmpeg-python'.format(env)) |
| os.system('{} pip install gradio==3.0.4'.format(env)) |
| os.system('{} pip install pytube==12.1.0'.format(env)) |
| os.system('{} pip install torchaudio==0.9.0 TTS'.format(env)) |
| os.system('{} pip install opencv-contrib-python-headless==4.1.2.30'.format(env)) |
| os.system('{} pip install IPython==7.32.0'.format(env)) |
| print("Installation repositories DONE!!") |
| |
|
|
|
|