Skip to content

Instantly share code, notes, and snippets.

@Iktomist
Created December 1, 2011 14:20
Show Gist options
  • Save Iktomist/1417066 to your computer and use it in GitHub Desktop.
Save Iktomist/1417066 to your computer and use it in GitHub Desktop.
Read go games in Audouard coordinates (caution -- SLOW -- working on a version that uses raw audio for speed)
#/bin/bash
DIR=`pwd`
sox -n -r 16000 "silence.wav" trim 0 10
cp silence.wav otherstuff.wav
#NB, each game should contain one move on each line. quadrant names such as a and b need to be followed by a space in order to make sense to festival. otherwise they will come out as b four three, etc.
while IFS= read -r line; do
echo "$line" | text2wave -o temp.wav
sox "otherstuff.wav" "temp.wav" "silence.wav" "output.wav"
mv output.wav otherstuff.wav
rm temp.wav
done < $@
mv otherstuff.wav $@.wav
ffmpeg -i $@.wav $@-again.wav
lame -V 08 --tt $@ --tl $dir --ta $dir $@-again.wav $@.mp3
rm -rf $@-again.wav $@.wav
rm -rf silence.wav otherstuff.wav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment