I hear that some people are still keeping their journals in written form. There's this new audio codec that is optimized for the human voice, called Ogg Speex. Try using it. Better yet, try expanding this script to support multi-session CD writes after each new file. From what I have read in the README.multi, it looks like you will have to create a new subdirectory level on every subsequent write. I've already coastered two CD's, and I don't feel like experimenting any more today. Oh, and the overhead from writing a new track after every journal entry is horribly wasteful. :-) Maybe I will re-write this as a Ruby app that will keep a table of new, unwritten journal files, and then offer to make a CD backup for every ~700MB of new files.
Change 32000 to something lower if you want.
#!/bin/sh
# First, generate a unique filename
BASEFILENAME=journal-`/bin/date +%F`.ogg
FILENAME=${BASEFILENAME}
X=0
while [ -e ${FILENAME} ]; do
FILENAME=${BASEFILENAME}.${X}
X=`echo "${X}+1" | bc`
done
# Do the recording
/usr/bin/sox -c 1 -r 32000 -t ossdsp -w -s /dev/dsp -t wav /dev/stdout \
| /usr/bin/speexenc - ${FILENAME}
# Ask the user if he wants to burn the CD
#echo -n "Do you want to burn a CD now [Yn]?"
#stty raw
#RESPONSE=`dd if=/dev/tty bs=1 count=1 2>/dev/null`
#stty sane
#echo
#if [ "${RESPONSE}" == "n" ]; then
# echo "Not writing session."
#else
# echo "Writing session..."
# echo "Obtaining information on session offset"
# NEXT_TRACK=`sudo cdrecord -msinfo -dev=0,1,0`
# TODO: Figure out which subdirectory we need to be in and create it.
# Change ${FILENAME} to ${DIRECTORYNAME} to do this black magic.
# CMD="mkisofs -R -C ${NEXT_TRACK} -M /dev/cdrom ${FILENAME} | sudo \
# cdrecord -dev=0,1,0 -speed=4 -v -multi -data -"
# echo "Executing: [${CMD}]"
#fi
Mike
--
------------------------------------------- | ---------------------
Michael Halcrow | [EMAIL PROTECTED]
Developer, IBM Linux Technology Center |
|
Give a man a fire, he will be warm for the |
evening. Set a man on fire, he will be warm |
for the rest of his life. |
------------------------------------------- | ---------------------
GnuPG Keyprint: 05B5 08A8 713A 64C1 D35D 2371 2D3C FDDA 3EB6 601D
pgp00000.pgp
Description: PGP signature
____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
