I had a really good day today, and I can't resist sharing:
I write educational software for kids (still coding for the switch from
SuperCard to MetaCard--I never should have committed to monthly releases,
but that's another story...) and a large part of the monthly task
involves recording a bunch of words that will be part of that month's
release. Each month we record about a thousand words. At first we did
them individually. Then I switched to having them recorded in batches of
forty or so, and cutting the words out of the larger recordings and
saving them individually at that point. It's slow, mostly manual work.
So today, I decided I'd had enough. For the time being I'm using AIFF, so
I looked it up on the Internet. It took about ten minutes with google to
find a web site detailing the file spec. A half hour reading. Then two
hours pulling apart actual sound files with MetaCard. (Surpisingly, my
very first attempt at building a legal AIFF sound file seems to work)
Then another two hours completing the code that handles naming the files
appropriately and allows reviews of what the sounds came out as. Now I'm
in the tweaking phase, because there's no such thing as silence when
you're recording, so it's not like I can look for a string of zeroes
between sounds.
What I have now is a stack that allows me to select a text file with the
words, reads it in, then allows me to select the sound file, then reads
in the sound file data, looking for strings of relative silence and
relative noise. It cuts them apart, creates individual files in the AIFF
format, saves them with the word names in order, and all at the rate of
about a word a second (it's examining the data byte by byte, so this is
faster than I expected).
Not bad for a few hours' effort--Thanks, Scott!
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.