Skip to content

Instantly share code, notes, and snippets.

@robmiller
Last active December 11, 2015 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robmiller/593dbf099b6b50905930 to your computer and use it in GitHub Desktop.
Save robmiller/593dbf099b6b50905930 to your computer and use it in GitHub Desktop.
childish fun
#!/bin/bash
# Uses text to speech to say MESSAGE 1,000 times, ensuring that sound
# is unmuted and the audio device is set to the internal speakers
#
# Usage: childish MESSAGE
#
# Requires audiodevice:
# http://whoshacks.blogspot.co.uk/2009/01/change-audio-devices-via-shell-script.html
for i in `seq 1 1000`
do
audiodevice output 'Internal Speakers'
sudo osascript -e "set Volume 10"
sudo osascript -e "set volume output muted false"
say $@
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment