On 6/16/06, Leslie Viljoen <leslieviljoen / gmail.com> wrote: > > What we need now is your master wav file! This software is cool, let's use it! > (look mummy, there goes a fit geek!) File is at: http://rubyurl.com/i6x There are at least 3 problems with it - It's missing a bunch of numbers, so you often get useless messages like: "you have . left to run" . Look for the "Can't Find ..." messages in the output to see what other numbers you need. - the pauses between words are too long. - The voice is really annoying. If you are really interested, I'd record your own voice, or someone who motivates you. The process to mark it up is actually simple. Make sure there is a bit of silence between each word in your recording. Then use the AutoCue feature of your wave editor to insert cues at the end of each silence. - I used GoldWave, which made it really easy. Delete any false cues in the middle of words, and add any missing ones. - I only found one extra cue. Then run this script, making sure that the list of words matches what you recorded. -----cuefixer.rb----- require 'wavespeaker.rb' Words = %w( run walk for second seconds minute minutes you are almost done have more to only left this phase there until the next activity ready go ok can now get rest keep it up way good job and long short runs walks exercise 1 2 3 4 5 6 10 15 30 60 in) class CueFixer < RiffRead def initialize io super raise "Not a Wave File" if @type != 'WAVE' @out = File.open("recued_coach.wav", "wb") @out.write('RIFF') @filesize_marker = @out.pos @out.write [0].pack('V') @written = @out.write('WAVE') end def close @out.seek @filesize_marker @out.write [@written].pack('V') @out.seek @listsize_marker @out.write [@written-@liststart].pack('V') @out.close p @written end def handle_tag tag,size @written += @out.write tag chunksize_marker = @out.pos @written += @out.write [size].pack('V') funcname = "parse_"+tag.strip if methods.include? funcname size = self.send(funcname, size) here = @out.pos @out.seek chunksize_marker @out.write [size].pack('V') @out.seek here else data = @io.read(size) @written += @out.write data data end end def handle_list @written += @out.write 'LIST' @listsize_marker = @io.pos @liststart = @written+4 @written += @out.write @io.read(8) end def parse_labl size id = get_long osize = @out.write [id].pack('V') @written+=osize string = @io.read(size-4) newcue = Words[id] p newcue @written += @out.write(newcue) @written += @out.write "\0" osize += newcue.size + 1 if osize%2 != 0 @written += @out.write "\0" end osize end end w = CueFixer.new(File.new("fullcoach.wav","rb")) w.parse w.close -----end----- Good Luck, -Adam