Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-17-2010, 12:54 AM   #1
LQ Newbie
Registered: Apr 2005
Posts: 5

Rep: Reputation: 0
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
goto loop

or like this to make adjustments easy

record -t 00:$1 -L $2 audiofile
play audiofile speed $3
goto loop

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 09:54 AM.
Old 10-18-2010, 12:17 PM   #2
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,638

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
man arecord
man aplay


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: MythTV - Record and playback all your favourite TV soaps in GNU/Linux LXer Syndicated Linux News 0 09-14-2006 04:54 PM
Cannot record from microphone device, playback via speakers work correctly habala Linux - Laptop and Netbook 0 01-16-2005 04:41 PM
[ALSA] Noisy playback after I record from line in halfzware_shag Linux - Software 0 11-27-2004 09:49 AM
Audio: Full duplex (playback/record) Utah Linux - Hardware 2 07-17-2004 12:29 PM
Audio: Full Duplex Playback/Record Utah Linux - General 0 07-16-2004 05:53 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:05 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration