Triggered record/playback (like a parrot) - can it be done with Linux commands?
I want to set up some parrot-like effects which will in fact be used with "demons" in my haunted house. I had cannabilized and augmented one of those parrot toys in the past but the circuit is unreliable.
The task is to wait until a sound above a volume threshold is heard then record for 5 seconds. When the recording is complete, play it back once at a slightly increased speed/pitch. After the playback, wait for another sound and do it all over. This must run automatically, with no GUI required.
I was looking at the Linux "record" command and 1) it can be set to trigger at a loudness threshold and 2) the recording length can be limited. But the reference documentation didn't specify if the command will terminate after a time-limited recording is complete. So the first question is, will record do what I want? It would seem that this would work: [ record -t 00:05 -L 2000 audiofile ]
I looked at the Linux "play" command. Is this command line player I should look at? The sourceforge page on sox is not clear to me, but seems to suggest I could use [ play audiofile speed 2 ]
I assume I can put this in a simple script like:
record -t 00:05 -L 2000 audiofile
play audiofile speed 2
or like this to make adjustments easy
record -t 00:$1 -L $2 audiofile
play audiofile speed $3
Lastly - I am a newbie because I banged my head against Linux documentation a few years ago and by now don't remember much. I would like to put this process together on a flash drive version of Linux so I can boot it into any PC. What would be the best distro choice of Linux to do that? I would want a distro that sets itself up on the flash drive without a lot more work on my part.
Thanks in advance for any suggestions.
Last edited by sawtode; 10-17-2010 at 08:54 AM.