to_video.py 678 B

1234567891011121314151617
  1. import celery
  2. import string
  3. import random
  4. import os
  5. # export CUDA_VISIBLE_DEVICES=0 ; python3.7 train.py -content /tmp/demo.wav -style input/girl52.wav
  6. #py -3.7 save_mel.py --face a1.mp4 --audio eng1.mp3 --checkpoint_path wav2lip_gan.pth
  7. #export CUDA_VISIBLE_DEVICES=0 ; python3.7 save_mel.py --face nina.mp4 --audio /tmp/demo.wav --checkpoint_path wav2lip_gan.pth
  8. from celery import Celery
  9. app = Celery('tasks', broker='redis://db.ptt.cx/0')
  10. @app.task
  11. def to_video(fname):
  12. os.chdir('/home/jared/to_video')
  13. os.system('python3.7 save_mel.py --face nina-no-ges.mp4 --audio /var/wav/'+fname+'.wav --checkpoint_path gan.pth')
  14. #text2mel_name="TACOTRON"
  15. return "ok"