Skip to content

Instantly share code, notes, and snippets.

@vyder
Created July 18, 2014 22:16
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 vyder/dc6f96cb592d6a3641f1 to your computer and use it in GitHub Desktop.
Save vyder/dc6f96cb592d6a3641f1 to your computer and use it in GitHub Desktop.
exit_cmds = [
"q", "x"
]
voice = ARGV[0] || "whisper" # Defaults to creeper voice
Thread.new do
loop do
sentence = gets.chomp
exit if exit_cmds.include?(sentence)
%x( say -v #{voice} #{sentence} )
end
end
i = 0
loop do
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment