I have a speaker (Bose SoundLink Mini) connected to my MacBook Pro, and it switches off after periods of non-use. This means that it will shut off even while I am at the computer, if a sound hasn't been played in awhile. What is the most sensible way to have a very quiet (ideally inaudible) sound played every fifteen minutes? I have a little familiarity with AppleScript and am happy to learn more; I don't yet know anything about other scripting methods.
The best way to occasionally play a sound
audio
Best Answer
Simply create a launch agent which repeatedly says something (or plays a sound) and load it:
Create a plist with nano in Terminal:
Copy the following lines and paste it into the Terminal window:
Save the file with ctrlO and exit nano with ctrlX
Load the plist with:
You can use other voices by adding the option
-v $VOICE
. To get the list of all available voices entersay -v ?
in Terminal.Example:
The downside of
say
: you can't set a sound level!Therefore an alternative launch agent with
afplay
instead (you can set the sound level with the -v option):