capstonedubtrack
commited on
Commit
•
e2950c6
1
Parent(s):
50f7dbd
Update app.py
Browse files
app.py
CHANGED
@@ -10,8 +10,6 @@ os.system('pip install gtts')
|
|
10 |
os.system('pip install googletrans==3.1.0a0')
|
11 |
os.system('pip install pydub')
|
12 |
os.system('pip3 install transformers==4.11.3 soundfile sentencepiece torchaudio librosa')
|
13 |
-
os.system('mv ./Wav2Lip/* .')
|
14 |
-
os.system('pip install -r requirements.txt')
|
15 |
|
16 |
title = "Automatic translation and dubbing for Indic Languages"
|
17 |
description = "A demo application to dub and translate videos spoken in Tamil, Hindi, Bengali and Telugu"
|
@@ -63,6 +61,8 @@ def inference(language,speed,voice,video ):
|
|
63 |
translation = translator.translate(text, src = 'en', dest='te', slow=con)
|
64 |
tts = gTTS(translation.text, lang= "hi")
|
65 |
tts.save('input_audio.wav')
|
|
|
|
|
66 |
os.system("python inference.py --checkpoint_path ./wav2lip_gan.pth --video {} --input_audio.wav {}".format(video))
|
67 |
return "./results/result_voice.mp4"
|
68 |
|
|
|
10 |
os.system('pip install googletrans==3.1.0a0')
|
11 |
os.system('pip install pydub')
|
12 |
os.system('pip3 install transformers==4.11.3 soundfile sentencepiece torchaudio librosa')
|
|
|
|
|
13 |
|
14 |
title = "Automatic translation and dubbing for Indic Languages"
|
15 |
description = "A demo application to dub and translate videos spoken in Tamil, Hindi, Bengali and Telugu"
|
|
|
61 |
translation = translator.translate(text, src = 'en', dest='te', slow=con)
|
62 |
tts = gTTS(translation.text, lang= "hi")
|
63 |
tts.save('input_audio.wav')
|
64 |
+
os.system('mv ./Wav2Lip/* .')
|
65 |
+
os.system('pip install -r requirements.txt')
|
66 |
os.system("python inference.py --checkpoint_path ./wav2lip_gan.pth --video {} --input_audio.wav {}".format(video))
|
67 |
return "./results/result_voice.mp4"
|
68 |
|