Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Choose an audio input device based on sound levels System
I frequently record Keynote presentations I give using my Mac (using ProfCast). Typically I use a wireless lapel mic and have my sound preferences pane set to record from Line In. However, on occasion I forget to turn on my mic, or the battery is dead, and so I get nothing but silence. In these instances, I'd like to be able to use my PowerBook's internal mic as a backup, so I set about finding a method using AppleScript to accomplish this.

I eventually got something working with the help of a freeware program called AudioLeak that monitors the RMS sound level of the selected input source. Together with a little GUI scripting, I can have my Mac try to connect to Line In, but switch to the internal mic if the line is dead. Here's the final script.

I have this script embedded in a droplet, so that I drag a Keynote file onto the droplet and it runs this script along with some other stuff I want to do just before starting a presentation (i.e. check monitor resolution, hide all other apps, etc), and then launch the file in Keynote. Alternatively, you could have this script run periodically using iCal or cron or an idle handler.

In addition to AudioLeak, you'll need to have GUI scripting enabled (in System Preferences » Universal Access).

[robg adds: I haven't tested this one.]
  • Currently 2.00 / 5
  You rated: 3 / 5 (4 votes cast)

Choose an audio input device based on sound levels | 3 comments | Create New Account
Click here to return to the 'Choose an audio input device based on sound levels' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Choose an audio input device based on sound levels
Authored by: Yoron on Jul 01, '07 09:50:07AM

What about using a similar script to warn/remind you that the lapel mic isn't on?

[ Reply to This | # ]
Choose an audio input device based on sound levels
Authored by: petethefriend on Feb 01, '10 11:51:45AM

This is very nearly just what I need.

What I 'DO' need however is something that can monitor an input source, if it falls silent go to another input source, but if the original source returns to switch back.

It is for an internet radio station, and I basically need silence detector switch.

Trying to get something running seems quite a trawl. Any helps, please email me:

peter.nicholls at

[ Reply to This | # ]
Choose an audio input device based on sound levels
Authored by: newblake on Mar 20, '13 06:10:40PM

This seems like the closest thing I've found for what I'm looking for.

Basically I need a script that detects the decibel level through the inbuilt mic. I want an action then to happen at different decibels brackets that I can set an IFTTT action to.

I'm a complete newb but getting into the idea of automating life and hacking DIY projects.

The use for the script I'm after is basically a prank. There's a VERY loud sneazer in the office and we want a choice of video files to be sent internally warning of 'Hurricane [name]'. Seemed like a fun project to learn a little scripting on.

[ Reply to This | # ]