File size: 1,743 Bytes
7df64f6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c91e7da
7df64f6
 
 
 
 
 
 
 
 
 
 
 
33cf586
 
c91e7da
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Import the os module
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='' 
## Step 1. Setup of the dependencies
is_first_time = True

#Install dependency
# Download pretrained model
# Get the current working directory
parent_dir = os.getcwd()
print(parent_dir)
if is_first_time:
    # Directory 
    directory = "sample_data"
    # Path 
    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')
    #os.system('cd Wav2Lip &&{} pip install  -r requirements.txt'.format(env))
    ## Load the models one by one.
    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!!")
#tqdm>=4.62.1