What is it?
voices.py is a self-contained python script that starts a webserver that listens on a user-entered IP and port that allows a visitor to remotely send text-to-speech commands on OS X machines.
What is it good for?
The machines that coworkers would leave unattended and unlocked is the primary impetus. If you find such a machine, do the following:
Open up Terminal.app
Type the following:
curl -L -O https://github.com/dcramer/voices.py/raw/master/bootstrap.sh && sh bootstrap.sh && rm bootstrap.sh
In a browser, go to the entered IP and port number. For example,
http://192.168.1.199:2046. You should be presented with a page that has a select box and a text box. Simply choose a voice and enter a message.
Why do I want to do this?
For hilarity! Suggestions:
- Use the "Whisper" voice and have the target's computer whisper "kill all humans" every 30 minutes or so.
- Use "Cellos" with a suitably catchy lyric.
- Use "Trinoids" and make the computer say: "Please wait. Calculating. Boop dee boop dee boop dee boop dee boop dee boop."
Mac OS X, obviously. And also Python.
Without an argument, voices.py will attempt to autodiscover your IP and automatically use 2046 as the port:
$ python voices.py Explicit IP and port not entered. Attempted to autodiscover IP address. Serving on 192.168.1.199:2046
With an argument, voices.py will use the IP and port you entered. Note that python does not have permission to bind to IPs that are not used by your machine:
$ python voices.py 192.168.1.199:8080 Serving on 192.168.1.199:8080
For a short help, do use
$ python voices.py --help Usage: python voices.py x.x.x.x:port