Help - Search - Members - Calendar
Full Version: The Zaurus, Tae Kwon Do, And Me
OESF Forums > General Forums > General Support and Discussion > Software
doug-taylor
Just wanted to share a little script I wrote for my Zaurus. I studied Tae Kwon Do (Korean Karate) a while back, and I always thought it provided a good aerobic workout. So I wrote down in a file every move (kicks, punches, blocks) I had learned, sent that list through an awk script that spat out random moves, and piped *that* list through flite.

The result is a script that runs completely on my SL-5500 and speaks 1000 random Tae Kwon Do moves for me to perform. Takes 30-40 minutes to run through the whole routine, and I'm sweating pretty hard by the end. Don't know if anyone else would be interested in this. I suppose it could be adapted to call out any random series of phrases for someone's amusement. :-)

Requires flite, awk, and, umm, probably the GNU textutils or bash or something.

Anyway, here's the script, between the rows of equals signs:
====
export MAXCOUNT=10
export COUNT=0
while [ $COUNT -lt $MAXCOUNT ]
do
COUNT=`expr $COUNT + 1`
echo "front kick
jumping front kick
side kick
#jumping side kick
turning side kick
back wheel kick
roundhouse kick
jumping roundhouse kick
half-moon kick
jumping half-moon kick
crescent kick
jumping crescent kick
side attack
fighting stance number one
fighting stance number two
one knife hand attack
reverse punch
middle punch
upper punch
reverse spinning knife hand attack
inside knife hand
outside knife hand
upper block
inside block
double inside block
outside block
lower block
double lower block"|
grep -v ^# | \
awk -v COUNT=$COUNT -v MAXCOUNT=$MAXCOUNT \
'BEGIN {srand();INDEX=0}
{MOVE[INDEX]=$0;INDEX++}
END {
if (COUNT == 1) {print "begin tie kwon doe exercise.";}
print "begin part " COUNT ".";
I=0;
while (I < 100) {
print MOVE[int(INDEX*rand())] ".";
I++;
}
print "end part " COUNT "."
if (COUNT == MAXCOUNT) {print "end tie kwon doe exercise.";}
}' |\
flite --setf duration_stretch=1.5 --setf int_f0_target_mean=145
done
====

Hope somebody likes it.
speculatrix
hmm, change the phrase list and you could inadvertently give your Zaurus a case of Tourettes Syndrome!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.