or in short: Ryukyu Kenpo.
http://ryukyu-kenpo.com/
I got my 3rd belt this month: yellow.
One of the ways to progress quickly in martial arts, is to train at home. at the off hours of the dojo.
But I wanted to create a new way to train, so that I will remember all techniques much better.
I wanted some one to tell my a name of a random technique. And I would have to perform it.
But I have no partner to train with, so I decided to create a project:
The goal: To create multiple audio files, each one is saying the name of one technique, with a delay to allow performing it, and than have those files on an ipod, and using the random option, I will be able to train.
The process:
Step 1:
Go to the ryukyu kenpo site. and save all techniques to a txt file.
Step 2:
Remove description of all techniques, leaving only the names.
I did this quickly using a vim macro.
Step 3:
Split the file to many files, each containing one technique.
I used the command:
-l 1 - meaning to split the file by single lines
This gave me a lot of files named:
xaa, xab ... xcj
Step 4:
Created a wav file of silence using Audacity
Step 5:
In the folder with multiple text files (xaa,xab...), I entered:
ls -l > filelist.txt
To create a file with the names of all the files, each one in it's own line
Step 6:
I wrote this bash program:
1 #!/bin/bash
2 cat ~/Desktop/filelist.txt| while read line;
3 do name=$(echo $line | cut -c58-70) ;espeak -f $name -w $name".wav" ;
4 done
Program explanation:
Line 2: Pump the filelist file to a loop, each iteration, the current technique name is stored in line.
Line 3:Cutting from:
-rw-rw-r-- 1 pentagonpie pentagonpie 32 2012-05-22 12:24 xcc
(The result of the 'ls -l')
only the last part:
xcc
Then using espeak, converting the text file into an audio file.
saving as program.bash.
Executing using
bash program.bash
To create a folder with all the text files mixed with the new .wav files
Step 7:
Deleting all txt files:
rm *.txt
Step 8:
Creating a program similar to the previous.
1 #!/bin/bash
2 cat ~/Desktop/filelist.txt| while read line;
3 do name=$(echo $line | cut -c58-70) ;sox -m $name".wav" final_silence.wav $name"2.wav" ;
4 done
Line 3: using sox to combine every file with the silence file from step 4.
Step 9:
Importing all audio files to ipod, and using portable speakers.
That is how I done it!
Sample file:
No comments:
Post a Comment