User:Joca/Prototyping T1: Difference between revisions

From XPUB & Lens-Based wiki
(Created page with "<source lang="bash"> convert *.jpeg *.jpg *.png output.pdf </source>")
 
No edit summary
 
Line 1: Line 1:
==Scans to PDF==
An imagemagick command to turn all images in a folder into one single PDF. I used this for the Special Issue to make sharable versions of the scans of multipage documents from the city archive.
<source lang="bash">
<source lang="bash">
convert *.jpeg *.jpg *.png output.pdf
convert *.jpeg *.jpg *.png output.pdf
</source>
==Webpage reader==
In one of the sessions, we worked with text to speech based on the script spell-and-speak. My script asks for a url and will then generate a video of an emoji reading out the text on the webpage.
<source lang="bash">
echo "What is the url you want me to read?"
read name
echo "You entered: $name"
timeout 2 w3m $name > lyrics.txt
espeak -f lyrics.txt -p 70 -w audio.wav
sox audio.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 audio.wav -y output*.mp4
mplayer output.mp4
rm audio*.wav
rm frame*.jpg
rm lyrics*.txt
</source>
</source>

Latest revision as of 12:04, 8 December 2017

Scans to PDF

An imagemagick command to turn all images in a folder into one single PDF. I used this for the Special Issue to make sharable versions of the scans of multipage documents from the city archive.

convert *.jpeg *.jpg *.png output.pdf

Webpage reader

In one of the sessions, we worked with text to speech based on the script spell-and-speak. My script asks for a url and will then generate a video of an emoji reading out the text on the webpage.

echo "What is the url you want me to read?"
read name
echo "You entered: $name"

timeout 2 w3m $name > lyrics.txt

espeak -f lyrics.txt -p 70 -w audio.wav

sox audio.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 audio.wav -y output*.mp4

mplayer output.mp4
rm audio*.wav
rm frame*.jpg
rm lyrics*.txt