Skip to content

Instantly share code, notes, and snippets.

@Iktomist
Created December 6, 2011 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Iktomist/1439360 to your computer and use it in GitHub Desktop.
Save Iktomist/1439360 to your computer and use it in GitHub Desktop.
reads audouard coordinates aloud. requires proper formatting. uses raw audio for speed. edit the lame command to your needs.
#/bin/bash
sox -n -r 16000 -s "silents.raw" trim 0 5
#NB, each game should contain one move on each line, followed by a period. 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 -otype raw -F 16000 >> temp.raw
cat silents.raw temp.raw >> output.raw
rm -rf temp.raw
done < $@
mv output.raw $@.raw
sox -r 16000 -b 16 -e signed-integer $@.raw $@.wav
ffmpeg -i $@.wav $@-again.wav
lame -V 08 --tt $@ --tl --ta $@-again.wav $@.mp3
rm -rf $@-again.wav $@.wav $@.raw silents.raw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment