Below is the code which I have modified also uploaded as a tar file
It now works
Code: Select all
#!/bin/sh
#/***************************************************************************/
#/* Program: based on wreckedleg Version: 0.5.0alpha2_bash */
#/* Creation date (YMD): 2007/09/29 */
#/* (C) Copyright 2007 William McEwan (mcewanw @ murga puppy forum) */
# mods Lobster June 2008
#/***************************************************************************/
cd /root/my-documents
export MAIN_DIALOG="
<window title=\"Precord \"icon-name=\"gtk-media-record\">
<hbox>
<frame Lock:>
<checkbox>
<label>\"\" </label>
<variable>LOCKCHOICE</variable>
<action>if true disable:DIRFILE</action>
<action>if false enable:DIRFILE</action>
</checkbox>
</frame>
<frame output directory and filename >\
<entry>
<default>\"/root/my-documents/out.mp3\"</default>
<variable>DIRFILE</variable>
</entry>
</frame>
<frame dir>
<button>
<input file stock=\"gtk-open\"></input>
<variable>PATHTOFILE</variable>
<action type=\"fileselect\">DIRFILE</action>
</button>
</frame>
<button>
<input file stock=\"gtk-media-record\"></input>
<label>REC</label>
<action>\"arecord -f cd -t raw | lame -x - \$DIRFILE &\"</action>
</button>
<button>
<input file stock=\"gtk-media-stop\"></input>
<label>STOP</label>
<action>sleep 2;killall lame</action>
</button>
<button>
<input file stock=\"gtk-quit\"></input>
<label>QUIT</label>
<action>killall lame</action>
<action type=\"exit\">EXIT-QUIT</action>
</button>
</hbox>
</window>
"
MAIN_DIALOG="`gtkdialog3 --program=MAIN_DIALOG --center`"
exit 0
Code: Select all
<action>\"arecord -f cd -t raw | lame -x - \$DIRFILE &\"</action>
use ctrl + c to finish recording . . .
It is not very efficient (produces large sound files)
but creates working mp3 files . . .
I did play with the parameters a little but it ended up sounding like chipmunks
Any ideas welcome
At the moment the sound is too quiet and recorded files are too large . . .
these are the arecord parameters (also 'arecord --h' on command line)
http://linuxcommand.org/man_pages/arecord1.html