Spaces:
Runtime error
Runtime error
import os | |
from argparse import Namespace | |
from | |
basePath = os.path.dirname(os.path.realpath(__file__)) | |
wav2lipFolderName = 'wav2lip' | |
gfpganFolderName = 'gfpgan' | |
wav2lipPath = os.path.join(basePath, wav2lipFolderName) | |
gfpganPath = os.path.join(basePath, gfpganFolderName) | |
outputPath = basePath + '/outputs' | |
inputAudioPath = basePath + '/inputs/kim_audio.mp3' | |
inputVideoPath = basePath + '/inputs/kimk_7s_raw.mp4' | |
lipSyncedOutputPath = basePath + '/outputs/result.mp4' | |
if not os.path.exists(outputPath): | |
os.makedirs(outputPath) | |
if __name__ == '__main__': | |
args = Namespace(checkpoint_path='checkpoints/wav2lip.pth', | |
face=inputVideoPath, | |
audio=inputAudioPath, | |
outfile='results/result_voice.mp4', | |
static=False, | |
fps=25.0, pads=[0, 10, 0, 0], face_det_batch_size=16, wav2lip_batch_size=128, resize_factor=1, | |
crop=[0, -1, 0, -1], box=[-1, -1, -1, -1], rotate=False, nosmooth=False, img_size=96) | |
print(inputAudioPath, os.path.isdir(inputAudioPath)) | |
print(inputVideoPath, os.path.isdir(inputVideoPath)) | |