Skip to content

Instantly share code, notes, and snippets.

@jimrubenstein
Created August 29, 2011 19:07
Show Gist options
  • Select an option

  • Save jimrubenstein/1179140 to your computer and use it in GitHub Desktop.

Select an option

Save jimrubenstein/1179140 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import os
import random
import time
os.system("osascript -e 'set volume 1' 2>/dev/null");
phrases = ("Help me, I'm stuck in here!", "Is anyone out there?", "Can anybody hear me?", "S O S", "It's dark in here..", "I'm watching you", "Please don't look at me like that", "Don't touch me there!", "What are you doing?", "Who are you?", "I know what you're typing...", "I wouldn't say that if I were you..")
voices = ("Zarvox", "Fred", "Ralph", "Victoria", "Princess", "Alex")
while (True):
phrase = phrases[ random.randrange(0, len(phrases) -1) ]
voice = voices[ random.randrange(0, len(voices) - 1) ]
os.system('say -v %s "%s"' % (voice, phrase, ))
time.sleep(random.randrange(1,2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment