User:Alexander Roidl/lipsync

From XPUB & Lens-Based wiki
< User:Alexander Roidl
Revision as of 12:28, 5 December 2017 by Alexander Roidl (talk | contribs) (Created page with "From given video frames (open mouth, closed mouth…) the aim of the script is to generate a lipsync. It makes use of the [https://github.com/hellocatfood/spell-and-speak spe...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

From given video frames (open mouth, closed mouth…) the aim of the script is to generate a lipsync. It makes use of the spell and speak script.

animate.sh:

echo "Clinton says:"
read content
echo $content | espeak -w generator.wav
sox generator.wav -b 8 -e unsigned-integer -c 1 -r 4000 -t raw rawfile
python lip-sync.py
ffmpeg -r 10 -i frame%09d.jpg -i generator.wav video1.MP4
mplayer video1.MP4
rm frame*.jpg

echo "Trump says:"
read content
echo $content | espeak -w generator.wav
sox generator.wav -b 8 -e unsigned-integer -c 1 -r 4000 -t raw rawfile
python lip-sync_trump.py
ffmpeg -r 10 -i frametrump%09d.jpg -i generator.wav video2.MP4
mplayer video2.MP4
rm frametrump*.jpg

echo "Clinton says:"
read content
echo $content | espeak -w generator.wav
sox generator.wav -b 8 -e unsigned-integer -c 1 -r 4000 -t raw rawfile
python lip-sync.py
ffmpeg -r 10 -i frame%09d.jpg -i generator.wav video3.MP4
mplayer video3.MP4
rm frame*.jpg

echo "Trump says:"
read content
echo $content | espeak -w generator.wav
sox generator.wav -b 8 -e unsigned-integer -c 1 -r 4000 -t raw rawfile
python lip-sync_trump.py
ffmpeg -r 10 -i frametrump%09d.jpg -i generator.wav video4.MP4
mplayer video4.MP4
rm frametrump*.jpg

echo "Clinton says:"
read content
echo $content | espeak -w generator.wav
sox generator.wav -b 8 -e unsigned-integer -c 1 -r 4000 -t raw rawfile
python lip-sync.py
ffmpeg -r 10 -i frame%09d.jpg -i generator.wav video5.MP4
mplayer video5.MP4
rm frame*.jpg

echo "Trump says:"
read content
echo $content | espeak -w generator.wav
sox generator.wav -b 8 -e unsigned-integer -c 1 -r 4000 -t raw rawfile
python lip-sync_trump.py
ffmpeg -r 10 -i frametrump%09d.jpg -i generator.wav video6.MP4
mplayer video6.MP4
rm frametrump*.jpg